mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
chore: update VERSION to 1.15.0 and fix build script
- Update VERSION file from 1.14.33 to 1.15.0 - Add Commit and BuildDate to ldflags in build script - Version now shows: 1.15.0 (commit: xxx, built: timestamp)
This commit is contained in:
+7
-1
@@ -8,6 +8,8 @@ if ! [[ "$0" =~ scripts/build.sh ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
VERSION=`cat VERSION`
|
VERSION=`cat VERSION`
|
||||||
|
COMMIT=`git rev-parse --short HEAD 2>/dev/null || echo "unknown"`
|
||||||
|
BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
|
||||||
|
|
||||||
if [ $# -eq 0 ] ; then
|
if [ $# -eq 0 ] ; then
|
||||||
OUTPUT="bin"
|
OUTPUT="bin"
|
||||||
@@ -21,4 +23,8 @@ fi
|
|||||||
# to pass this flag to all child processes spawned by the shell.
|
# to pass this flag to all child processes spawned by the shell.
|
||||||
export CGO_CFLAGS="-O -D__BLST_PORTABLE__"
|
export CGO_CFLAGS="-O -D__BLST_PORTABLE__"
|
||||||
|
|
||||||
go build -v -ldflags="-X 'github.com/luxfi/netrunner/cmd.Version=$VERSION'" -o $OUTPUT/netrunner
|
LDFLAGS="-X 'github.com/luxfi/netrunner/cmd.Version=$VERSION'"
|
||||||
|
LDFLAGS="$LDFLAGS -X 'github.com/luxfi/netrunner/cmd.Commit=$COMMIT'"
|
||||||
|
LDFLAGS="$LDFLAGS -X 'github.com/luxfi/netrunner/cmd.BuildDate=$BUILD_DATE'"
|
||||||
|
|
||||||
|
go build -v -ldflags="$LDFLAGS" -o $OUTPUT/netrunner
|
||||||
|
|||||||
Reference in New Issue
Block a user