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

Unified Diff: tools/dartium/update_version.py

Issue 244643006: Migrate dartium_tools from chrome branch to dart repo (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Replace obsolete roll scripts with terry's Created 6 years, 8 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
Index: tools/dartium/update_version.py
diff --git a/tools/dartium/update_version.py b/tools/dartium/update_version.py
new file mode 100755
index 0000000000000000000000000000000000000000..020eea39b3ed948b1fbbbe476dc364de3c0ba985
--- /dev/null
+++ b/tools/dartium/update_version.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+#
+# Copyright 2012 Google Inc. All Rights Reserved.
+
+import subprocess
+import sys
+
+def FetchSVNRevision():
+ try:
+ proc = subprocess.Popen(['svn', 'info'],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ cwd='src/dart',
+ shell=(sys.platform=='win32'))
+ except OSError:
+ # command is apparently either not installed or not executable.
+ return None
+ if not proc:
+ return None
+
+ for line in proc.stdout:
+ line = line.strip()
+ if not line:
+ continue
+ key, val = line.split(': ', 1)
+ if key == 'Revision':
+ return val
+
+ return None
+
+
+def main():
+ revision = FetchSVNRevision()
+ path = 'src/chrome/VERSION'
+ text = file(path).readlines()
+ text[2] = 'BUILD=d%s\n' % revision
+ file(path, 'w').writelines(text)
+
+if __name__ == '__main__':
+ main()

Powered by Google App Engine
This is Rietveld 408576698