15 lines
456 B
Bash
Executable File
15 lines
456 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
if [ "$#" -ne 1 ]; then
|
|
printf '%s\n' 'usage: ./scripts/release VERSION' >&2
|
|
exit 2
|
|
fi
|
|
|
|
releasekit_host_os=$(GOTOOLCHAIN=local go env GOHOSTOS) || exit $?
|
|
releasekit_host_arch=$(GOTOOLCHAIN=local go env GOHOSTARCH) || exit $?
|
|
export GOOS="$releasekit_host_os" GOARCH="$releasekit_host_arch"
|
|
mkdir -p .releasekit/bin
|
|
GOTOOLCHAIN=local go build -o .releasekit/bin/releasekit ./cmd/releasekit
|
|
exec .releasekit/bin/releasekit publish "$1"
|