mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 02:22:26 -05:00
put version in binary properly (#73)
Addresses #71 : Set version on the CLI framework. Add a build.sh script that injects variables into the build tooling using git and a version file. Set version in config.
This commit is contained in:
parent
87cf621e21
commit
4f3b3f5c0b
9 changed files with 38 additions and 11 deletions
8
build.sh
Executable file
8
build.sh
Executable 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue