From ec53b0d2d445edf6f6384adaf48ea6613ec43334 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sun, 28 Sep 2025 11:52:17 -0300 Subject: [PATCH] release.sh: make the list of tags reproducible When doing git-clone to a subdir, do not keep tags, since there can be local tags affecting `git describe` and buildvcs info. Instead pull the tags from upstream. --- release.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/release.sh b/release.sh index 343b7f7f..37cdaee3 100755 --- a/release.sh +++ b/release.sh @@ -157,7 +157,19 @@ fi green " - Cloning to subdir ${BUILD_DIR} to get clean Git" mkdir -p "$BUILD_DIR" cd "$BUILD_DIR" -git clone --tags "$SCRIPT_DIR" . +git clone --no-tags "$SCRIPT_DIR" . + +# It is cloned without tags from the local dir and tags are pulled later +# from the upstream to make sure we have the same set of tags. Otherwise +# we can endup with different `git describe` and buildvcs info depending +# on local tags. +green " - Pulling tags from upstream" +git pull --tags https://github.com/lightninglabs/loop + +# The cloned Git repo may be on wrong branch and commit. +commit=$(git --git-dir "${SCRIPT_DIR}/.git" rev-parse HEAD) +green " - Checkout commit ${commit} in ${BUILD_DIR}" +git checkout -b build-branch "$commit" green " - Checking tag $1" check_tag $1