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:
Zach Kelling
2025-12-29 15:39:52 -08:00
parent 94b4fccdfb
commit 6e8fb5d409
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
1.14.33
1.15.0
+7 -1
View File
@@ -8,6 +8,8 @@ if ! [[ "$0" =~ scripts/build.sh ]]; then
fi
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
OUTPUT="bin"
@@ -21,4 +23,8 @@ fi
# to pass this flag to all child processes spawned by the shell.
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