2020-10-27 04:23:58 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
#
|
|
|
|
# Runs `go build` with flags configured for binary distribution. All
|
|
|
|
# it does differently from `go build` is burn git commit and version
|
|
|
|
# information into the binaries, so that we can track down user
|
|
|
|
# issues.
|
|
|
|
#
|
|
|
|
# If you're packaging Tailscale for a distro, please consider using
|
|
|
|
# this script, or executing equivalent commands in your
|
|
|
|
# distro-specific build system.
|
|
|
|
|
2020-11-03 22:39:45 +00:00
|
|
|
set -eu
|
2020-10-27 04:23:58 +00:00
|
|
|
|
2020-11-03 22:39:45 +00:00
|
|
|
eval $(./version/version.sh)
|
2020-10-27 04:23:58 +00:00
|
|
|
|
2020-11-03 22:39:45 +00:00
|
|
|
exec go build -tags xversion -ldflags "-X tailscale.com/version.Long=${VERSION_LONG} -X tailscale.com/version.Short=${VERSION_SHORT} -X tailscale.com/version.GitCommit=${VERSION_GIT_HASH}" "$@"
|