mirror of
https://github.com/tailscale/tailscale.git
synced 2025-07-31 08:13:44 +00:00
build_dist.sh: allow settings custom build tags (#15589)
Default tags to `$TAGS` if set, so that people can choose arbitrary subsets of features. Updates #12614 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
parent
b9277ade1f
commit
1da78d8718
@ -28,18 +28,26 @@ EOF
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tags=""
|
tags="${TAGS:-}"
|
||||||
ldflags="-X tailscale.com/version.longStamp=${VERSION_LONG} -X tailscale.com/version.shortStamp=${VERSION_SHORT}"
|
ldflags="-X tailscale.com/version.longStamp=${VERSION_LONG} -X tailscale.com/version.shortStamp=${VERSION_SHORT}"
|
||||||
|
|
||||||
# build_dist.sh arguments must precede go build arguments.
|
# build_dist.sh arguments must precede go build arguments.
|
||||||
while [ "$#" -gt 1 ]; do
|
while [ "$#" -gt 1 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--extra-small)
|
--extra-small)
|
||||||
|
if [ ! -z "${TAGS:-}" ]; then
|
||||||
|
echo "set either --extra-small or \$TAGS, but not both"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
shift
|
shift
|
||||||
ldflags="$ldflags -w -s"
|
ldflags="$ldflags -w -s"
|
||||||
tags="${tags:+$tags,}ts_omit_aws,ts_omit_bird,ts_omit_tap,ts_omit_kube,ts_omit_completion,ts_omit_ssh,ts_omit_wakeonlan,ts_omit_capture"
|
tags="${tags:+$tags,}ts_omit_aws,ts_omit_bird,ts_omit_tap,ts_omit_kube,ts_omit_completion,ts_omit_ssh,ts_omit_wakeonlan,ts_omit_capture"
|
||||||
;;
|
;;
|
||||||
--box)
|
--box)
|
||||||
|
if [ ! -z "${TAGS:-}" ]; then
|
||||||
|
echo "set either --box or \$TAGS, but not both"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
shift
|
shift
|
||||||
tags="${tags:+$tags,}ts_include_cli"
|
tags="${tags:+$tags,}ts_include_cli"
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user