2021-06-28 10:17:20 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
2022-04-28 12:32:53 +00:00
|
|
|
# DEBUG returns whether DEBUG build is enabled.
|
|
|
|
DEBUG() { [ ! -z "${DEBUG-}" ]; }
|
|
|
|
|
2021-08-26 10:19:52 +00:00
|
|
|
CGO_ENABLED=0 go build -trimpath \
|
2022-04-28 12:32:53 +00:00
|
|
|
-tags "netgo osusergo static_build $(DEBUG && echo 'debugenv')" \
|
2022-04-02 13:40:09 +00:00
|
|
|
-ldflags="-s -w -extldflags '-static' -X 'main.Version=${VERSION:-$(git describe --tags --abbrev=0)}'" \
|
2021-08-26 10:19:52 +00:00
|
|
|
./cmd/gotosocial
|