From 6e8fb5d40916ccc973e92dcfb39354583f387588 Mon Sep 17 00:00:00 2001 From: Zach Kelling Date: Mon, 29 Dec 2025 15:39:52 -0800 Subject: [PATCH] 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) --- VERSION | 2 +- scripts/build.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 34b2208a..141f2e80 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.14.33 +1.15.0 diff --git a/scripts/build.sh b/scripts/build.sh index 8c4e7957..c1f921b5 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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