put version in binary properly

This commit is contained in:
tsmethurst 2021-06-28 12:14:54 +02:00
commit daa96eb247
9 changed files with 36 additions and 10 deletions

8
build.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
set -eu
export COMMIT=$(git rev-list -1 HEAD)
export VERSION=$(cat ./version)
go build -ldflags="-X 'main.Commit=$COMMIT' -X 'main.Version=$VERSION'" ./cmd/gotosocial