diff --git a/scripts/build.sh b/scripts/build.sh index f848b0b..683c8e6 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,6 +2,8 @@ # Metricator build script. +GO=${GO:=$(which go)} + source ./scripts/shell_helpers/get_git_data.sh WHATTOBUILD=$1 @@ -13,5 +15,7 @@ LINKERFLAGS="\ -X go.dev.pztrn.name/metricator/internal/common.Version=${VERSION}" +echo "Using $(go version) at ${GO}" + cd cmd/${WHATTOBUILD} go build -tags netgo -ldflags "${LINKERFLAGS} -w -extldflags '-static'" -o ../../._bin/${WHATTOBUILD}