buildkit/hack/binaries

23 lines
456 B
Bash
Executable File

#!/usr/bin/env bash
. $(dirname $0)/util
set -eu
: ${TARGETPLATFORM=}
: ${BUILDKITD_TAGS=}
platformFlag="--platform local"
if [ -n "$TARGETPLATFORM" ]; then
platformFlag="--platform $TARGETPLATFORM"
fi
buildkitdTagsFlags=""
if [ -n "$BUILDKITD_TAGS" ]; then
buildkitdTagsFlags="--build-arg=BUILDKITD_TAGS=\"$BUILDKITD_TAGS\""
fi
buildxCmd build $platformFlag $buildkitdTagsFlags \
--target "binaries" \
--output "type=local,dest=./bin/" \
.