DPUT_OPTIONS = DPUT_OPTIONS_DEFAULT
+ # get the current commit id
+ current_commit = git_helper.git_get_commit_id()
+
if options.distribution in ('testing', 'staging', 'unstable', 'pre-staging','experimental') or GIT_BRANCH_NAME.startswith('release/'):
daily_date = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
- current_commit = git_helper.git_get_commit_id()
if GIT_BRANCH_NAME.startswith('release/'):
version = '%s~rc%s+%s+%s' %(version, daily_date, BUILD_NUMBER, current_commit[0:7])
debian_branch=GIT_DEBIAN_BRANCH,
dist='squeeze',
arch='amd64',
- pb_suite=pb_suite
+ pb_suite=pb_suite,
+ git_commit_id=current_commit
)
logger.info('used to start git-buildpackage here...')
BIN_GIT_BUILDPACKAGE = '/usr/bin/git-buildpackage'
BIN_SUDO = '/usr/bin/sudo'
-# sudo DIST=squeeze git-buildpackage --git-upstream-branch=master
-# --git-debian-branch=debian --git-tag
class GitBuildPackage(object):
def __init__(self, upstream_branch=None,
- debian_branch=None, dist=None, arch=None, pb_suite=None):
+ debian_branch=None, dist=None, arch=None, pb_suite=None, git_commit_id=None):
self.upstream_branch = upstream_branch
self.debian_branch = debian_branch
self.dist = dist
self.arch = arch
self.pb_suite = pb_suite
-
+ self.git_commit_id = git_commit_id
def build(self):
cmd = [
env = os.environ
env['DIST'] = self.dist
env['PB_SUITE'] = self.pb_suite
+ env['GIT_COMMIT_ID'] = self.git_commit_id
logger.debug(
'Trying to call "%s" with environment export %s'