summaryrefslogtreecommitdiff
path: root/scripts/build.sh
blob: 6c3f86778fe18bd59bcbc65f5cbe093a32f4e04b (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

set -eu

COMMIT="${COMMIT:-1234567}"
VERSION="${VERSION:-0.0.0}"

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