From 908ff63f16e0b48250e21ba392bb35724cc66cdf Mon Sep 17 00:00:00 2001 From: Mathias Klette Date: Wed, 29 May 2013 14:11:23 +0200 Subject: [PATCH] common_code: reset GIT_BRANCH if it differs from GIT_BRANCH_NAME Most jobs use GIT_BRANCH_NAME parameter to let user choose the branch to build the package from while GIT_BRANCH contains the sha commit id of HEAD of most recent commit (unconfirmed yet). --- common_code.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common_code.py b/common_code.py index f2ad5d8..2b01ffc 100755 --- a/common_code.py +++ b/common_code.py @@ -49,6 +49,8 @@ ENV = os.environ ENV.setdefault('ARGV',' '.join(sys.argv)) ENV.setdefault('CWD',os.getcwd()) ENV.setdefault('GIT_BRANCH_NAME', ENV['GIT_BRANCH']) +if ENV['GIT_BRANCH'] != ENV['GIT_BRANCH_NAME']: + ENV['GIT_BRANCH'] = ENV['GIT_BRANCH_NAME'] BIN_DCH = '/usr/bin/dch' BIN_DPUT = '/usr/bin/dput' -- 2.39.5