From a8b2f9261b957bd268820528734d597460336b1f Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 16 Apr 2013 18:13:59 +0200 Subject: [PATCH] add support for auto-releases of master branch (for ri- and so-docs) --- debian_build.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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')] -- 2.39.5