]> xenbits.xensource.com Git - people/pauldu/xenbus.git/commitdiff
[CP-4699] Modify build.py to cope with git & jenkins git plugin
authorBen Chalmers <Ben.Chalmers@citrix.com>
Tue, 28 May 2013 15:25:06 +0000 (16:25 +0100)
committerBen Chalmers <Ben.Chalmers@citrix.com>
Tue, 28 May 2013 15:25:06 +0000 (16:25 +0100)
build.py

index 0483e54764188d6ae9615af711af8666fb72bac8..1d7d32bbef153c4293334bb1c515b923b614b1af 100644 (file)
--- a/build.py
+++ b/build.py
@@ -288,9 +288,9 @@ if __name__ == '__main__':
     debug = { 'checked': True, 'free': False }
     driver = 'xenbus'
 
-    if 'MERCURIAL_REVISION' in os.environ.keys():
+    if 'GIT_REVISION' in os.environ.keys():
         revision = open('revision', 'w')
-        print(os.environ['MERCURIAL_REVISION'], file=revision)
+        print(os.environ['GIT_REVISION'], file=revision)
         revision.close()
 
     os.environ['MAJOR_VERSION'] = '7'
@@ -320,7 +320,7 @@ if __name__ == '__main__':
     symstore_add(driver, 'x86', debug[sys.argv[1]])
     symstore_add(driver, 'x64', debug[sys.argv[1]])
 
-    listfile = callfnout(['hg','manifest'])   
+    listfile = callfnout(['git','ls-tree', '-r', '--name-only', 'HEAD'])   
     archive(driver + '\\source.tgz', listfile.splitlines(), tgz=True)
     archive(driver + '.tar', [driver,'revision'])