Skip to content

Commit

Permalink
Merge pull request #1314 from justaugustus/test-cluster-up
Browse files Browse the repository at this point in the history
push-build: look for version in bazel-bin
  • Loading branch information
k8s-ci-robot committed May 27, 2020
2 parents 61f9d7d + e637429 commit 0a7c40f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions push-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,18 @@ RELEASE_BUCKET=${FLAGS_bucket:-"kubernetes-release-dev"}
# This will canonicalize the path
KUBE_ROOT=$(pwd -P)

# TODO: this should really just read the version from the release tarball always
USE_BAZEL=false
if release::was_built_with_bazel $KUBE_ROOT $FLAGS_release_kind; then
USE_BAZEL=true
bazel build //:version
LATEST=$(cat $KUBE_ROOT/bazel-genfiles/version)
# The check for version in bazel-genfiles can be removed once everyone is off
# of versions before 0.25.0.
# https://github.com/bazelbuild/bazel/issues/8651
if [[ -r "$KUBE_ROOT/bazel-genfiles/version" ]]; then
LATEST=$(cat $KUBE_ROOT/bazel-genfiles/version)
else
LATEST=$(cat $KUBE_ROOT/bazel-bin/version)
fi
else
LATEST=$(tar -O -xzf $KUBE_ROOT/_output/release-tars/$FLAGS_release_kind.tar.gz $FLAGS_release_kind/version)
fi
Expand Down

0 comments on commit 0a7c40f

Please sign in to comment.