Correctly set version info when building, fixed build script and added headers for apps endpoints.
This commit is contained in:
@@ -3,3 +3,15 @@
|
||||
# Metricator build script.
|
||||
|
||||
source ./scripts/shell_helpers/get_git_data.sh
|
||||
|
||||
WHATTOBUILD=$1
|
||||
|
||||
LINKERFLAGS="\
|
||||
-X go.dev.pztrn.name/metricator/internal/common.Branch=${BRANCHNAME} \
|
||||
-X go.dev.pztrn.name/metricator/internal/common.Build=${BUILDID} \
|
||||
-X go.dev.pztrn.name/metricator/internal/common.CommitHash=${COMMITHASH} \
|
||||
-X go.dev.pztrn.name/metricator/internal/common.Version=${VERSION}"
|
||||
|
||||
|
||||
cd cmd/${WHATTOBUILD}
|
||||
go build -tags netgo -ldflags "${LINKERFLAGS} -w -extldflags '-static'" -o ../../._bin/${WHATTOBUILD}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# Showing git data in console.
|
||||
source ./scripts/shell_helpers/get_git_data.sh
|
||||
|
||||
echo "* Branch: ${BRANCH}"
|
||||
echo "* Branch: ${BRANCHNAME}"
|
||||
echo "* Build ID: ${BUILDID}"
|
||||
echo "* Commit hash: ${COMMITHASH}"
|
||||
echo "* Version: ${VERSION}"
|
||||
|
Reference in New Issue
Block a user