Index: client/tools/buildbot_annotated_steps.py |
=================================================================== |
--- client/tools/buildbot_annotated_steps.py (revision 13661) |
+++ client/tools/buildbot_annotated_steps.py (working copy) |
@@ -95,6 +95,9 @@ |
print 'ProcessTools' |
toolsBuildScript = os.path.join('.', 'editor', 'build', 'build.py') |
+ |
+ # get the latest changed revision from the current repository sub-tree |
danrubel
2012/10/15 20:49:35
Should this be moved to GetBuildInfo?
And perhaps
devoncarew
2012/10/15 20:55:28
I added a TODO. This probably should be in GetBuil
|
+ version = GetLatestChangedRevision() |
#TODO: debug statements to be removed in the future. |
print "mode = " + mode |
@@ -152,8 +155,36 @@ |
def GetShouldClobber(): |
return os.environ.get(BUILDER_CLOBBER) == "1" |
+def RunDart(scriptPath): |
+ if sys.platform == 'darwin': |
+ pipe = subprocess.Popen( |
+ ['./tools/testing/bin/macos/dart', scriptPath], |
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
+ elif os.name == 'posix': |
+ pipe = subprocess.Popen( |
+ ['./tools/testing/bin/linux/dart', scriptPath], |
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
+ else: |
+ pipe = subprocess.Popen( |
+ ['tools\\testing\\bin\\windows\\dart.exe', scriptPath], |
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) |
+ |
+ output = pipe.communicate() |
+ return output[0] |
+ |
+def GetLatestChangedRevision(): |
+ # 0.1.2.0_r13661 |
+ # 0.1.2.0_r13661_username |
+ fullVersion = RunDart("tools/version.dart") |
+ |
+ m = re.search('._r(\d+)', fullVersion) |
+ svnRev = m.group(1) |
+ |
+ return svnRev |
+ |
def main(): |
print 'main' |
dgrove
2012/10/15 21:02:12
is this leftover debugging?
devoncarew
2012/10/15 21:03:44
It was in there already - doesn't seem to add a lo
|
+ |
if len(sys.argv) == 0: |
print 'Script pathname not known, giving up.' |
return 1 |