Skip to content

Commit

Permalink
[infra] Always produce a proper Dart version string on release channels
Browse files Browse the repository at this point in the history
Previously, if --custom_for_pub was used we used the latest dev tag.
This "best effort" for Dart rolls from bleeding edge, but doesn't make
sense when rolling from other channels that have a proper version in the
VERSION file.

Change-Id: Icaf6c26858d9fd2132d26b7d64da21b3a05f0092
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105763
Reviewed-by: Siva Annamalai <[email protected]>
  • Loading branch information
athomas committed Jun 12, 2019
1 parent 972ad1c commit 73e2f46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/make_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def debugLog(message):
]

def MakeVersionString(quiet, no_git_hash, custom_for_pub=None):
if custom_for_pub:
channel = utils.GetChannel()
if custom_for_pub and channel == 'be':
latest = utils.GetLatestDevTag()
if not latest:
# If grabbing the dev tag fails, then fall back on the VERSION file.
Expand Down Expand Up @@ -101,7 +102,8 @@ def main(args):
action="store",
type="string",
help=("Generates a version string that works with pub that includes"
"the given string"))
"the given string. This is silently ignored on channels other"
"than be"))
parser.add_option("--input",
action="store",
type="string",
Expand Down

0 comments on commit 73e2f46

Please sign in to comment.