Require Tailscale go toolchain in $PATH.

Setting GOBIN was not sufficient, something deeper in
the build process is invoking the go tool without $GOBIN.
Instead, require it be first in $PATH.

This is necessary to fix
https://github.com/tailscale/tailscale/issues/2450
and (hopefully)
https://github.com/tailscale/tailscale/issues/2478
which are a SECCOMP crash in accept() which we have
patched in the Tailscale toolchain by pulling in
an early patch from go 1.17.

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
pull/16/head
Denton Gentry 3 years ago
parent 0df2377630
commit 7ebedfd62a

@ -31,6 +31,7 @@ tag_release:
git tag -a "$(VERSION_LONG)"
$(DEBUG_APK):
(go version | grep -- "-ts") || (echo Must set have Tailscale production toolchain in PATH; exit 1)
mkdir -p android/libs
go run gioui.org/cmd/gogio -buildmode archive -target android -appid $(APPID) -o $(AAR) github.com/tailscale/tailscale-android/cmd/tailscale
(cd android && ./gradlew assemblePlayDebug)
@ -38,7 +39,7 @@ $(DEBUG_APK):
# This target is also used by the F-Droid builder.
release_aar:
(${GOBIN}/go version | grep -- "-ts") || (echo Must set GOBIN to Tailscale production toolchain; exit 1)
(go version | grep -- "-ts") || (echo Must set have Tailscale production toolchain in PATH; exit 1)
mkdir -p android/libs
go run gioui.org/cmd/gogio -ldflags "-X tailscale.com/version.Long=$(VERSIONNAME) -X tailscale.com/version.Short=$(VERSIONNAME_SHORT) -X tailscale.com/version.GitCommit=$(TAILSCALE_COMMIT) -X tailscale.com/version.ExtraGitCommit=$(OUR_VERSION)" -tags xversion -buildmode archive -target android -appid $(APPID) -o $(AAR) github.com/tailscale/tailscale-android/cmd/tailscale

Loading…
Cancel
Save