Skip to content

Commit

Permalink
Skip goversioninfo when it is not installed
Browse files Browse the repository at this point in the history
Release image does not contain this and an upstream bug is blocking
regeneration of the images due to bad tito dependencies.

Change the ordering of the makefile and the release image to make
failures easier to work around.
  • Loading branch information
smarterclayton committed Jul 30, 2017
1 parent 68feae6 commit c4dd4cf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ clean:
#
# Example:
# make release
official-release: build-rpms build-cross
official-release: build-cross build-rpms
hack/build-images.sh
.PHONY: official-release

Expand Down
6 changes: 5 additions & 1 deletion hack/lib/build/binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ os::build::internal::build_binaries() {
fi

if [[ "$platform" == "windows/amd64" ]]; then
rm ${OS_ROOT}/cmd/oc/oc.syso
rm -f ${OS_ROOT}/cmd/oc/oc.syso
fi

for test in "${tests[@]:+${tests[@]}}"; do
Expand All @@ -261,6 +261,10 @@ readonly -f os::build::build_binaries
# Generates the .syso file used to add compile-time VERSIONINFO metadata to the
# Windows binary.
function os::build::generate_windows_versioninfo() {
if ! os::util::find::system_binary "goversioninfo" >/dev/null 2>&1; then
os::log::warning "No system binary 'goversioninfo' found, skipping version info for Windows builds"
return 0
fi
os::build::version::get_vars
local major="${OS_GIT_MAJOR}"
local minor="${OS_GIT_MINOR%+}"
Expand Down
8 changes: 5 additions & 3 deletions hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ elif [[ "$( git rev-parse "${tag}" )" != "$( git rev-parse HEAD )" ]]; then
fi
commit="$( git rev-parse ${tag} )"

# Ensure that the build is using the latest release image
docker pull "${OS_BUILD_ENV_IMAGE}"
# Ensure that the build is using the latest release image and base content
if [[ -z "${OS_RELEASE_STALE}" ]]; then
docker pull "${OS_BUILD_ENV_IMAGE}"
hack/build-base-images.sh
fi

hack/build-base-images.sh
hack/env OS_GIT_COMMIT="${commit}" make official-release
OS_PUSH_ALWAYS=1 OS_PUSH_TAG="${tag}" OS_TAG="" OS_PUSH_LOCAL="1" hack/push-release.sh

Expand Down

0 comments on commit c4dd4cf

Please sign in to comment.