Skip to content

Commit

Permalink
look for version in bazel-bin
Browse files Browse the repository at this point in the history
bazel-bin and bazel-genfiles have pointed to the same location since
0.25. -genfiles is deprecated.

This was test running:

../test-infra/scenarios/kubernetes_bazel.py --push

With bazel version 2.2.0 and 0.23.2.

Issue: bazelbuild/bazel#8651
  • Loading branch information
mikedanese committed Mar 24, 2020
1 parent 0897dba commit 7ceb4fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scenarios/kubernetes_bazel.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def echo_result(res):

def get_version():
"""Return kubernetes version"""
if os.path.isfile('bazel-bin/version'):
with open('bazel-bin/version') as fp:
return fp.read().strip()
# This can be removed once everyone is off of versions before 0.25.0
# https://github.com/bazelbuild/bazel/issues/8651
with open('bazel-genfiles/version') as fp:
return fp.read().strip()

Expand Down

0 comments on commit 7ceb4fd

Please sign in to comment.