From: Mathias Klette Date: Fri, 16 Sep 2011 17:50:23 +0000 (+0200) Subject: fix: re-order so we are in repo when using git X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=2e920543ad0ef6b80480b270c304eee4abc2748d;p=profitbricks%2Fjenkins-build-scripts.git fix: re-order so we are in repo when using git --- diff --git a/debian_build.py b/debian_build.py index 81f1002..4acc9f4 100755 --- a/debian_build.py +++ b/debian_build.py @@ -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()