2018-10-11 06:46:34 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
TAG=$1
|
|
|
|
OUT=$2
|
|
|
|
|
2020-11-24 21:51:52 +00:00
|
|
|
. $(dirname $0)/util
|
2018-10-11 06:46:34 +00:00
|
|
|
set -eu -o pipefail
|
|
|
|
|
|
|
|
: ${PLATFORMS=linux/amd64}
|
|
|
|
|
|
|
|
usage() {
|
|
|
|
echo "usage: ./hack/release-tar <tag> <out>"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2020-07-25 03:36:55 +00:00
|
|
|
if [ -z "$TAG" ] || [ -z "$OUT" ]; then
|
2018-10-11 06:46:34 +00:00
|
|
|
usage
|
|
|
|
fi
|
|
|
|
|
2021-08-03 06:44:50 +00:00
|
|
|
buildxCmd build $cacheFromFlags \
|
2020-11-24 21:51:52 +00:00
|
|
|
--target release \
|
|
|
|
--platform "$PLATFORMS" \
|
|
|
|
--output "type=local,dest=$OUT" \
|
|
|
|
$currentcontext
|