| 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')
|
|
|