Dont' suffix version number with username on production builds
Review URL: https://codereview.chromium.org//11048049
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13592 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/tools/release/version.dart b/tools/release/version.dart
index c5f1bc5..5197f75 100644
--- a/tools/release/version.dart
+++ b/tools/release/version.dart
@@ -152,6 +152,10 @@
});
}
+ bool isProductionBuild(String username) {
+ return username == "chrome-bot";
+ }
+
String getUserName() {
// TODO(ricow): Don't add this on the buildbot.
var key = "USER";
@@ -159,7 +163,11 @@
key = "USERNAME";
}
if (!Platform.environment.containsKey(key)) return "";
- return Platform.environment[key];
+ var username = Platform.environment[key];
+ // If this is a production build, i.e., this is something we are shipping,
+ // don't suffix the version with the username.
+ if (isProductionBuild(username)) return "";
+ return username;
}
RepositoryType get repositoryType {