From ed12f5a440541496d7f063c11a95835f778c92b6 Mon Sep 17 00:00:00 2001 From: ShahanaFarooqui Date: Fri, 30 Aug 2024 20:51:37 -0700 Subject: [PATCH] git: Reset for Docker image creation --- Dockerfile | 7 ++++++- Makefile | 2 +- tools/repro-build.sh | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b9df81f6dcca..8c3acd8bcbf4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -199,7 +199,12 @@ RUN ( ! [ "${target_host}" = "arm-linux-gnueabihf" ] ) || \ # https://github.com/ElementsProject/lightning/pull/7376#issuecomment-2161102381 RUN poetry lock --no-update && poetry install -RUN ./configure --prefix=/tmp/lightning_install --enable-static && make && poetry run make install +# Ensure that git differences are removed before making bineries, to avoid `-modded` suffix +# poetry.lock changed due to pyln-client, pyln-proto and pyln-testing version updates +# pyproject.toml was updated to exclude clnrest and wss-proxy plugins in base-builder stage +RUN git reset --hard HEAD + +RUN ./configure --prefix=/tmp/lightning_install --enable-static && poetry run make install # Export the requirements for the plugins so we can install them in builder-python stage WORKDIR /opt/lightningd/plugins/clnrest diff --git a/Makefile b/Makefile index d4551cf79b70..9ff384bff6d6 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ #! /usr/bin/make # Extract version from git, or if we're from a zipfile, use dirname -VERSION=$(shell git describe --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's|.*/c\{0,1\}lightning-v\{0,1\}\([0-9a-f.rc\-]*\)$$|\1|gp') +VERSION=$(shell git describe --tags --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's|.*/c\{0,1\}lightning-v\{0,1\}\([0-9a-f.rc\-]*\)$$|\1|gp') # Next release. CLN_NEXT_VERSION := v24.08 diff --git a/tools/repro-build.sh b/tools/repro-build.sh index 3b63127c16d5..6c346616c623 100755 --- a/tools/repro-build.sh +++ b/tools/repro-build.sh @@ -54,7 +54,7 @@ else fi PLATFORM="$OS"-"$VER" -VERSION=${FORCE_VERSION:-$(git describe --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's,.*/clightning-\(v[0-9.rc\-]*\)$,\1,p')} +VERSION=${FORCE_VERSION:-$(git describe --tags --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's,.*/clightning-\(v[0-9.rc\-]*\)$,\1,p')} # eg. ## [0.6.3] - 2019-01-09: "The Smallblock Conspiracy" # Skip 'v' here in $VERSION