From 73e2f469f8e312c256fa657b3b9868c90fe5b31c Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Wed, 12 Jun 2019 18:24:03 +0000 Subject: [PATCH] [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 --- tools/make_version.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/make_version.py b/tools/make_version.py index bf8861778e6b..05f72e894271 100755 --- a/tools/make_version.py +++ b/tools/make_version.py @@ -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. @@ -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",