You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
TAG=$1
|
|
|
|
OUT=$2
|
|
|
|
|
|
|
|
. $(dirname $0)/util
|
|
|
|
set -eu -o pipefail
|
|
|
|
|
|
|
|
: ${PLATFORMS=linux/amd64}
|
|
|
|
|
|
|
|
usage() {
|
|
|
|
echo "usage: ./hack/release <tag> <out>"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ -z "$TAG" ] || [ -z "$OUT" ]; then
|
|
|
|
usage
|
|
|
|
fi
|
|
|
|
|
|
|
|
importCacheFlags=""
|
|
|
|
if [[ -n "$cacheRefFrom" ]] && [[ "$cacheType" = "local" ]]; then
|
|
|
|
for ref in $cacheRefFrom; do
|
|
|
|
importCacheFlags="$importCacheFlags--cache-from=type=local,src=$ref "
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
buildxCmd build $importCacheFlags \
|
|
|
|
--target "release" \
|
|
|
|
--platform "$PLATFORMS" \
|
|
|
|
--output "type=local,dest=$OUT" \
|
|
|
|
$currentcontext
|