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 0b4ee02
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scenarios/kubernetes_bazel.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,13 @@ def echo_result(res):

def get_version():
"""Return kubernetes version"""
with open('bazel-genfiles/version') as fp:
# 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 os.path.isfile('bazel-genfiles/version'):
with open('bazel-genfiles/version') as fp:
return fp.read().strip()
with open('bazel-bin/version') as fp:
return fp.read().strip()

def get_changed(base, pull):
Expand Down

0 comments on commit 0b4ee02

Please sign in to comment.