2021-06-28 12:17:20 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
2021-08-26 12:19:52 +02:00
|
|
|
COMMIT=$(git rev-list -1 HEAD)
|
|
|
|
VERSION=$(cat ./version)
|
2021-06-28 12:17:20 +02:00
|
|
|
|
2021-08-26 12:19:52 +02:00
|
|
|
CGO_ENABLED=0 go build -trimpath \
|
|
|
|
-tags 'netgo osusergo static_build' \
|
|
|
|
-ldflags="-s -w -extldflags '-static' -X 'main.Commit=${COMMIT}' -X 'main.Version=${VERSION}'" \
|
|
|
|
./cmd/gotosocial
|