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