mirror of
https://github.com/openshift/installer.git
synced 2026-02-06 00:48:45 +01:00
This gets the correct main.version value. Before this commit, you
could have:
$ hack/release.sh v0.4.0
...
+ go build -ldflags ' -X main.version=v0.3.0-273-g...' ...
...
With this commit, that same invocation will give you:
+ go build -ldflags ' -X main.version=v0.4.0' ...
The bug is from the initial script in 7b023303 (hack/release: Make it
easy to cross-compile release binaries, 2018-10-02, #397).
22 lines
426 B
Bash
Executable File
22 lines
426 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Prepare for a release. Usage:
|
|
#
|
|
# $ hack/release.sh v0.1.0
|
|
|
|
set -ex
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
TAG="${1}"
|
|
|
|
git tag -sm "version ${TAG}" "${TAG}"
|
|
./build.sh # ensure freshly-generated data
|
|
for GOOS in darwin linux
|
|
do
|
|
GOARCH=amd64
|
|
OUTPUT="bin/openshift-install-${GOOS}-${GOARCH}"
|
|
GOOS="${GOOS}" GOARCH="${GOARCH}" OUTPUT="${OUTPUT}" SKIP_GENERATION=y ./build.sh
|
|
done
|
|
(cd ../bin && sha256sum openshift-install-*)
|