From: Holger Levsen Date: Tue, 16 Apr 2013 16:13:59 +0000 (+0200) Subject: add support for auto-releases of master branch (for ri- and so-docs) X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=a8b2f9261b957bd268820528734d597460336b1f;p=profitbricks%2Fjenkins-build-scripts.git add support for auto-releases of master branch (for ri- and so-docs) --- diff --git a/debian_build.py b/debian_build.py index e6b2f47..5b5653a 100755 --- a/debian_build.py +++ b/debian_build.py @@ -293,6 +293,15 @@ if __name__ == '__main__': else: logger.debug('Status is now:\n%s' %( gitcmd.status().strip() )) + if (BUILD_JOBNAME == 'ri-docs' or BUILD_JOBNAME == 'so-docs') and GIT_BRANCH_NAME == 'master': + cmd = ['/usr/bin/git-dch', '-R', '-a'] + subprocess.check_call(cmd) + cmd = ['/usr/bin/git', 'commit', '-a', '-s', '-m', 'Released by jenkins'] + subprocess.check_call(cmd) + cmd = ['/usr/bin/git', 'push', 'origin', 'master'] + subprocess.check_call(cmd) + logger.info('Releeeeeased!!!') + # cleanup existing *orig.tar.gz if os.path.isdir(BUILD_AREA): files = [os.path.join(BUILD_AREA,file) for file in fnmatch.filter(os.listdir(BUILD_AREA),'*.orig.tar.gz')]