Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

push-build: look for version in bazel-bin #1314

Merged
merged 1 commit into from
May 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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