Skip to content

Commit

Permalink
Fix "same major version" check logic (#52)
Browse files Browse the repository at this point in the history
This was introduced in 2db269a, but unintentionally checked for full
equality of major, minor and patch version rather than just the major
version.
  • Loading branch information
fmeum authored Mar 24, 2024
1 parent 94f11b7 commit 9c958c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion private/util.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def ge(v):

def ge_same_major(v):
pv = parse_version(v)
return BAZEL_VERSION >= pv and BAZEL_VERSION[0] == pv[0]
# Version 1.2.3 parses to ([1, 2, 3], ...).
return BAZEL_VERSION >= pv and BAZEL_VERSION[0][0] == pv[0][0]

def gt(v):
return BAZEL_VERSION > parse_version(v)

0 comments on commit 9c958c2

Please sign in to comment.