Skip to content

Commit aec03c1

Browse files
committed
release.sh: set -buildid to ''
If Go binary itself comes from `go install golang.org/dl/go1.24.6@latest` it embeds a different BuildID. We unset BuildID to enforce reproducibility.
1 parent 25c5618 commit aec03c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ SYS=${LOOPBUILDSYS:-"windows-amd64 linux-386 linux-amd64 linux-armv6 linux-armv7
246246

247247
PKG="github.com/lightninglabs/loop"
248248
COMMIT=$(git describe --abbrev=40 --dirty)
249-
COMMITFLAGS="-X $PKG/build.Commit=$COMMIT"
249+
GOLDFLAGS="-X $PKG/build.Commit=$COMMIT -buildid="
250250

251251
cd "$BUILD_DIR"
252252
for i in $SYS; do
@@ -267,7 +267,7 @@ for i in $SYS; do
267267

268268
green "- Building: $OS $ARCH $ARM"
269269
for bin in loop loopd; do
270-
env CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH GOARM=$ARM "$GO_CMD" build -v -trimpath -ldflags "$COMMITFLAGS" "github.com/lightninglabs/loop/cmd/$bin"
270+
env CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH GOARM=$ARM "$GO_CMD" build -v -trimpath -ldflags "$GOLDFLAGS" "github.com/lightninglabs/loop/cmd/$bin"
271271
done
272272
cd ..
273273

0 commit comments

Comments
 (0)