]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
fix: re-order so we are in repo when using git
authorMathias Klette <mathias.klette@profitbricks.com>
Fri, 16 Sep 2011 17:50:23 +0000 (19:50 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Fri, 16 Sep 2011 17:50:23 +0000 (19:50 +0200)
debian_build.py

index 81f1002eeefe955ba7bc7c0f7459c7da7a9891b2..4acc9f48dae5a3be055cd1a3f617fb4756ce883a 100755 (executable)
@@ -276,12 +276,6 @@ if __name__ == '__main__':
             logger.error('Could not determine GIT_UPSTREAM_BRANCH')
             exit_error()
 
-    # git-buildpackage uses only treeish object in v0.5.10,
-    # let's fetch it correctly:
-    GIT_UPSTREAM_BRANCH = git_helper.git_get_treeish(
-        os.path.join('origin', GIT_UPSTREAM_BRANCH)
-    )
-
     repo = git.repo.Repo()
 
     if GIT_DEBIAN_BRANCH != 'master':
@@ -290,6 +284,13 @@ if __name__ == '__main__':
                 os.path.join('origin', GIT_DEBIAN_BRANCH)
         )
 
+    # git-buildpackage uses only treeish object in v0.5.10,
+    # let's fetch it correctly
+    # TODO: upgrade git-buildpackage
+    GIT_UPSTREAM_BRANCH = git_helper.git_get_treeish(
+        os.path.join('origin', GIT_UPSTREAM_BRANCH)
+    )
+
     cleanup_files = ('.gbp.conf', 'debian/gbp.conf', '.git/gbp.conf')
     result = git_helper.git_cleanup_branch(cleanup_files)
     commit_files = result["goods"].keys()