Skip to content

Commit 73e2f46

Browse files
committed
[infra] Always produce a proper Dart version string on release channels
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]>
1 parent 972ad1c commit 73e2f46

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tools/make_version.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def debugLog(message):
4141
]
4242

4343
def MakeVersionString(quiet, no_git_hash, custom_for_pub=None):
44-
if custom_for_pub:
44+
channel = utils.GetChannel()
45+
if custom_for_pub and channel == 'be':
4546
latest = utils.GetLatestDevTag()
4647
if not latest:
4748
# If grabbing the dev tag fails, then fall back on the VERSION file.
@@ -101,7 +102,8 @@ def main(args):
101102
action="store",
102103
type="string",
103104
help=("Generates a version string that works with pub that includes"
104-
"the given string"))
105+
"the given string. This is silently ignored on channels other"
106+
"than be"))
105107
parser.add_option("--input",
106108
action="store",
107109
type="string",

0 commit comments

Comments
 (0)