2021-03-18 21:14:53 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
2021-03-18 22:24:46 +00:00
|
|
|
GOPATH=$GOPATH:$(pwd)
|
|
|
|
export GOPATH
|
|
|
|
|
|
|
|
GIT_COMMIT=$(git rev-list -1 HEAD)
|
|
|
|
export GIT_COMMIT
|
2021-03-18 21:14:53 +00:00
|
|
|
CANONICAL_VERSION=$(cat ./VERSION)
|
2021-03-18 22:24:46 +00:00
|
|
|
export CANONICAL_VERSION
|
|
|
|
VERSION_STRING="$CANONICAL_VERSION-$GIT_COMMIT"
|
|
|
|
export VERSION_STRING
|
2021-03-18 21:14:53 +00:00
|
|
|
|
|
|
|
go mod vendor
|
|
|
|
go mod tidy
|
2021-03-18 22:24:46 +00:00
|
|
|
|
2021-03-18 21:14:53 +00:00
|
|
|
go build -o build/gostations -ldflags "-X main.version=$VERSION_STRING"
|