Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1936)

Unified Diff: tools/release/version.dart

Issue 11048049: Dont' suffix version number with username on production builds (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/release/version.dart
===================================================================
--- tools/release/version.dart (revision 13566)
+++ tools/release/version.dart (working copy)
@@ -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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698