1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +01:00
Files
installer/hack/release.sh
W. Trevor King d6e2bf090b hack/release: Tag before building
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).
2018-11-22 09:50:07 -08:00

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-*)