kubectl-persistent-logger/build.sh

14 lines
319 B
Bash
Raw Normal View History

2022-06-09 18:56:44 +00:00
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
gitchanges="false"
if [[ `git status --porcelain` ]]; then
gitchanges="true"
fi
gitsha1=$(git rev-parse HEAD | head -c 9)
buildtime=$(date --iso-8601=seconds)
2022-06-20 18:40:20 +00:00
go build -ldflags "-X main.gitChanges=$gitchanges -X main.gitSHA1=$gitsha1 -X main.buildTime=$buildtime"