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

set -eu

COMMIT="${COMMIT:-12345678}"
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