mirror of
https://github.com/moby/buildkit.git
synced 2026-08-10 17:14:08 +00:00
32 lines
560 B
Bash
Executable File
32 lines
560 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
TAG=$1
|
|
OUT=$2
|
|
|
|
. $(dirname $0)/util
|
|
set -eu -o pipefail
|
|
|
|
: ${PLATFORMS=linux/amd64}
|
|
|
|
usage() {
|
|
echo "usage: ./hack/release-tar <tag> <out>"
|
|
exit 1
|
|
}
|
|
|
|
if [ -z "$TAG" ] || [ -z "$OUT" ]; then
|
|
usage
|
|
fi
|
|
|
|
importCacheFlags=""
|
|
if [[ -n "$cacheref" ]] && [[ "$cachetype" = "local" ]]; then
|
|
for ref in $cacheref; do
|
|
importCacheFlags="$importCacheFlags--cache-from=type=local,src=$ref "
|
|
done
|
|
fi
|
|
|
|
buildxCmd build $importCacheFlags \
|
|
--target release \
|
|
--platform "$PLATFORMS" \
|
|
--output "type=local,dest=$OUT" \
|
|
$currentcontext
|