Skip to content

Commit 1999237

Browse files
ShahanaFarooquimadelinevibes
authored andcommitted
tools: Fix sign and docker target detection when passed as single argument
The sign target detection uses pattern matching that requires spaces on both sides of "sign" in the TARGETS variable. When only "sign" is passed as an argument, TARGETS becomes " sign" (leading space only), causing the condition to fail. Add an additional pattern match to detect "sign" with a leading space but no trailing space, which occurs when "sign" is the only target or the last target in the list. This regression seems to have been exposed by GitHub Actions runner updates (Ubuntu 22.04 → 24.04), which changed argument passing behavior. Changelog-None: Fixes the release signing issue in CI only.
1 parent d07eb80 commit 1999237

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/build-release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ for target in $TARGETS; do
209209
esac
210210
done
211211

212-
if [ -z "${TARGETS##* docker *}" ]; then
212+
if [ -z "${TARGETS##* docker *}" ] || [ -z "${TARGETS##* docker}" ]; then
213213
echo "Building Docker Images"
214214
DOCKER_USER="elementsproject"
215215
echo "Creating multi-platform images tagged as $VERSION and latest"
@@ -230,7 +230,7 @@ if [ -z "${TARGETS##* docker *}" ]; then
230230
echo "Pushed multi-platform images tagged as $VERSION and latest"
231231
fi
232232

233-
if [ -z "${TARGETS##* sign *}" ]; then
233+
if [ -z "${TARGETS##* sign *}" ] || [ -z "${TARGETS##* sign}" ]; then
234234
echo "Signing Release"
235235
cd release/ || exit
236236
sha256sum clightning-"$VERSION"-*.tar.* clightning-"$VERSION".zip > SHA256SUMS-"$VERSION"

0 commit comments

Comments
 (0)