mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-28 13:52:55 +02:00
release: update release script to compile commit hash into binary
This commit is contained in:
@@ -26,6 +26,7 @@ SYS="windows-386 windows-amd64 openbsd-386 openbsd-amd64 linux-386 linux-amd64 l
|
||||
# Use the first element of $GOPATH in the case where GOPATH is a list
|
||||
# (something that is totally allowed).
|
||||
GPATH=$(echo $GOPATH | cut -f1 -d:)
|
||||
COMMITFLAGS="-X main.Commit=$(git rev-parse HEAD)"
|
||||
|
||||
for i in $SYS; do
|
||||
OS=$(echo $i | cut -f1 -d-)
|
||||
@@ -33,8 +34,8 @@ for i in $SYS; do
|
||||
mkdir $PACKAGE-$i-$TAG
|
||||
cd $PACKAGE-$i-$TAG
|
||||
echo "Building:" $OS $ARCH
|
||||
env GOOS=$OS GOARCH=$ARCH go build -v github.com/lightningnetwork/lnd
|
||||
env GOOS=$OS GOARCH=$ARCH go build -v github.com/lightningnetwork/lnd/cmd/lncli
|
||||
env GOOS=$OS GOARCH=$ARCH go build -v -ldflags "$COMMITFLAGS" github.com/lightningnetwork/lnd
|
||||
env GOOS=$OS GOARCH=$ARCH go build -v -ldflags "$COMMITFLAGS" github.com/lightningnetwork/lnd/cmd/lncli
|
||||
cd ..
|
||||
if [[ $OS = "windows" ]]; then
|
||||
zip -r $PACKAGE-$i-$TAG.zip $PACKAGE-$i-$TAG
|
||||
|
Reference in New Issue
Block a user