Better new-pocket affordances in invirtibuilder and build submission script
[invirt/packages/invirt-dev.git] / invirt-submit-build
index 4bed2ee..f202c3d 100755 (executable)
@@ -24,6 +24,8 @@ import sys
 import tempfile
 import uuid
 
 import tempfile
 import uuid
 
+from invirt.config import structs as config
+import invirt.common as c
 import invirt.builder as b
 
 
 import invirt.builder as b
 
 
@@ -43,6 +45,8 @@ def main():
     try:
         # TODO: clean up this interface.
         b.ensureValidPackage(package)
     try:
         # TODO: clean up this interface.
         b.ensureValidPackage(package)
+        if config.build.get('mirror'):
+            c.captureOutput(['git', 'fetch'], cwd=b.getRepo(package))
         commit = b.canonicalize_commit(package, commit)
         b.validateBuild(pocket, package, commit)
     except b.InvalidBuild, e:
         commit = b.canonicalize_commit(package, commit)
         b.validateBuild(pocket, package, commit)
     except b.InvalidBuild, e: