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

Unified Diff: tools/utils.py

Issue 11143010: Update revision info to version info for dart2js et al. (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 | « tools/create_sdk.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/utils.py
===================================================================
--- tools/utils.py (revision 13566)
+++ tools/utils.py (working copy)
@@ -152,6 +152,14 @@
def GetBaseDir():
return BASE_DIR
+def GetVersion():
+ dartbin = DartBinary()
+ version_script = VersionScript()
+ p = subprocess.Popen([dartbin, version_script], stdout = subprocess.PIPE,
+ stderr = subprocess.STDOUT, shell=IsWindows())
+ output, not_used = p.communicate()
+ return output.strip()
+
def GetSVNRevision():
p = subprocess.Popen(['svn', 'info'], stdout = subprocess.PIPE,
stderr = subprocess.STDOUT, shell=IsWindows())
@@ -297,6 +305,11 @@
os.utime(name, None)
+def VersionScript():
+ tools_dir = os.path.dirname(os.path.realpath(__file__))
+ return os.path.join(tools_dir, 'version.dart')
+
+
def DartBinary():
tools_dir = os.path.dirname(os.path.realpath(__file__))
dart_binary_prefix = os.path.join(tools_dir, 'testing', 'bin')
« no previous file with comments | « tools/create_sdk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698