Add convenient build shortcut

This commit is contained in:
2021-07-14 12:24:54 +02:00
parent 38fd09a196
commit 28ca50f451

8
build.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
GITCOMMIT=$(git rev-parse --short HEAD 2>/dev/null)
DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
VERSION=$(git branch --show-current)
go build -ldflags "-X speedrun/cmd.version=$VERSION -X speedrun/cmd.commit=$GITCOMMIT -X speedrun/cmd.date=$DATE"