2021-10-28 11:51:09 +01:00
|
|
|
IMAGE_REPO ?= tailscale/tailscale
|
2022-01-21 20:05:48 +00:00
|
|
|
SYNO_ARCH ?= "amd64"
|
|
|
|
SYNO_DSM ?= "7"
|
2021-10-28 11:51:09 +01:00
|
|
|
|
2020-06-15 19:04:19 +01:00
|
|
|
usage:
|
|
|
|
echo "See Makefile"
|
|
|
|
|
2020-08-25 05:35:27 +01:00
|
|
|
vet:
|
2022-03-18 16:58:20 +00:00
|
|
|
./tool/go vet ./...
|
2020-08-25 05:35:27 +01:00
|
|
|
|
2022-03-21 18:03:45 +00:00
|
|
|
tidy:
|
2022-08-02 19:34:03 +01:00
|
|
|
./tool/go mod tidy
|
2022-03-21 18:03:45 +00:00
|
|
|
|
2020-09-09 20:17:44 +01:00
|
|
|
updatedeps:
|
2022-08-05 19:12:35 +01:00
|
|
|
./tool/go run github.com/tailscale/depaware --update \
|
|
|
|
tailscale.com/cmd/tailscaled \
|
|
|
|
tailscale.com/cmd/tailscale \
|
|
|
|
tailscale.com/cmd/derper
|
2020-09-09 20:17:44 +01:00
|
|
|
|
|
|
|
depaware:
|
2022-08-05 19:12:35 +01:00
|
|
|
./tool/go run github.com/tailscale/depaware --check \
|
|
|
|
tailscale.com/cmd/tailscaled \
|
|
|
|
tailscale.com/cmd/tailscale \
|
|
|
|
tailscale.com/cmd/derper
|
2020-09-09 20:17:44 +01:00
|
|
|
|
2021-02-28 05:42:34 +00:00
|
|
|
buildwindows:
|
2022-03-18 16:58:20 +00:00
|
|
|
GOOS=windows GOARCH=amd64 ./tool/go install tailscale.com/cmd/tailscale tailscale.com/cmd/tailscaled
|
2021-02-28 05:42:34 +00:00
|
|
|
|
2021-03-01 19:19:20 +00:00
|
|
|
build386:
|
2022-03-18 16:58:20 +00:00
|
|
|
GOOS=linux GOARCH=386 ./tool/go install tailscale.com/cmd/tailscale tailscale.com/cmd/tailscaled
|
2021-03-01 19:19:20 +00:00
|
|
|
|
2021-08-18 23:36:04 +01:00
|
|
|
buildlinuxarm:
|
2022-03-18 16:58:20 +00:00
|
|
|
GOOS=linux GOARCH=arm ./tool/go install tailscale.com/cmd/tailscale tailscale.com/cmd/tailscaled
|
2021-08-18 23:36:04 +01:00
|
|
|
|
2022-08-15 15:03:29 +01:00
|
|
|
buildwasm:
|
|
|
|
GOOS=js GOARCH=wasm ./tool/go install ./cmd/tsconnect/wasm ./cmd/tailscale/cli
|
|
|
|
|
2022-12-12 04:16:40 +00:00
|
|
|
buildlinuxloong64:
|
|
|
|
GOOS=linux GOARCH=loong64 ./tool/go install tailscale.com/cmd/tailscale tailscale.com/cmd/tailscaled
|
|
|
|
|
2021-10-28 11:51:09 +01:00
|
|
|
buildmultiarchimage:
|
2021-11-22 04:52:19 +00:00
|
|
|
./build_docker.sh
|
2021-10-28 11:51:09 +01:00
|
|
|
|
2022-08-15 15:03:29 +01:00
|
|
|
check: staticcheck vet depaware buildwindows build386 buildlinuxarm buildwasm
|
2020-06-15 19:04:19 +01:00
|
|
|
|
|
|
|
staticcheck:
|
2022-03-18 16:58:20 +00:00
|
|
|
./tool/go run honnef.co/go/tools/cmd/staticcheck -- $$(./tool/go list ./... | grep -v tempfork)
|
2021-12-06 17:22:21 +00:00
|
|
|
|
|
|
|
spk:
|
2022-01-21 20:05:48 +00:00
|
|
|
PATH="${PWD}/tool:${PATH}" ./tool/go run github.com/tailscale/tailscale-synology@main -o tailscale.spk --source=. --goarch=${SYNO_ARCH} --dsm-version=${SYNO_DSM}
|
|
|
|
|
|
|
|
spkall:
|
|
|
|
mkdir -p spks
|
|
|
|
PATH="${PWD}/tool:${PATH}" ./tool/go run github.com/tailscale/tailscale-synology@main -o spks --source=. --goarch=all --dsm-version=all
|
2021-12-06 17:22:21 +00:00
|
|
|
|
|
|
|
pushspk: spk
|
2022-01-21 20:05:48 +00:00
|
|
|
echo "Pushing SPK to root@${SYNO_HOST} (env var SYNO_HOST) ..."
|
|
|
|
scp tailscale.spk root@${SYNO_HOST}:
|
|
|
|
ssh root@${SYNO_HOST} /usr/syno/bin/synopkg install tailscale.spk
|
2022-10-21 18:12:34 +01:00
|
|
|
|
|
|
|
publishdevimage:
|
|
|
|
@test -n "${REPO}" || (echo "REPO=... required; e.g. REPO=ghcr.io/${USER}/tailscale" && exit 1)
|
|
|
|
@test "${REPO}" != "tailscale/tailscale" || (echo "REPO=... must not be tailscale/tailscale" && exit 1)
|
|
|
|
@test "${REPO}" != "ghcr.io/tailscale/tailscale" || (echo "REPO=... must not be ghcr.io/tailscale/tailscale" && exit 1)
|
|
|
|
TAGS=latest REPOS=${REPO} PUSH=true ./build_docker.sh
|