|
|
|
@ -26,12 +26,16 @@ eval $(./build_dist.sh shellvars)
|
|
|
|
|
DEFAULT_TAGS="v${VERSION_SHORT},v${VERSION_MINOR}"
|
|
|
|
|
DEFAULT_REPOS="tailscale/tailscale,ghcr.io/tailscale/tailscale"
|
|
|
|
|
DEFAULT_BASE="ghcr.io/tailscale/alpine-base:3.16"
|
|
|
|
|
DEFAULT_TARGET="client"
|
|
|
|
|
|
|
|
|
|
PUSH="${PUSH:-false}"
|
|
|
|
|
REPOS="${REPOS:-${DEFAULT_REPOS}}"
|
|
|
|
|
TAGS="${TAGS:-${DEFAULT_TAGS}}"
|
|
|
|
|
BASE="${BASE:-${DEFAULT_BASE}}"
|
|
|
|
|
TARGET="${TARGET:-${DEFAULT_TARGET}}"
|
|
|
|
|
|
|
|
|
|
case "$TARGET" in
|
|
|
|
|
client)
|
|
|
|
|
go run github.com/tailscale/mkctr \
|
|
|
|
|
--gopaths="\
|
|
|
|
|
tailscale.com/cmd/tailscale:/usr/local/bin/tailscale, \
|
|
|
|
@ -46,3 +50,22 @@ go run github.com/tailscale/mkctr \
|
|
|
|
|
--repos="${REPOS}" \
|
|
|
|
|
--push="${PUSH}" \
|
|
|
|
|
/usr/local/bin/containerboot
|
|
|
|
|
;;
|
|
|
|
|
operator)
|
|
|
|
|
go run github.com/tailscale/mkctr \
|
|
|
|
|
--gopaths="tailscale.com/cmd/k8s-operator:/usr/local/bin/operator" \
|
|
|
|
|
--ldflags="\
|
|
|
|
|
-X tailscale.com/version.Long=${VERSION_LONG} \
|
|
|
|
|
-X tailscale.com/version.Short=${VERSION_SHORT} \
|
|
|
|
|
-X tailscale.com/version.GitCommit=${VERSION_GIT_HASH}" \
|
|
|
|
|
--base="${BASE}" \
|
|
|
|
|
--tags="${TAGS}" \
|
|
|
|
|
--repos="${REPOS}" \
|
|
|
|
|
--push="${PUSH}" \
|
|
|
|
|
/usr/local/bin/operator
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
echo "unknown target: $TARGET"
|
|
|
|
|
exit 1
|
|
|
|
|
;;
|
|
|
|
|
esac
|