return cmdobj
def exit_ok():
+ remove_git_target_workspace()
send_email(SMTP_BUILD_SUCCESS)
sys.exit(0)
logger.info('git clone was not successfull')
exit_error()
- atexit.register(remove_git_target_workspace)
+ #atexit.register(remove_git_target_workspace)
os.chdir(GIT_TARGET_DIR)
if GIT_UPSTREAM_BRANCH != GIT_DEBIAN_BRANCH:
cmd,
shell=False,
close_fds=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
+ stdout=sys.stdout,
+ stderr=sys.stderr,
cwd='./'
)
ret = parse_changelog.wait()
+ if ret:
+ raise Exception(
+ '%s was not successfull, return code was %s ' % (' '.join(cmd), ret)
+ exit_error()
+ )
cmd = ['grep-dctrl', '-n', '-s', 'Version', '']
grep_dctrl = subprocess.Popen(
shell=False,
close_fds=True,
stdin=parse_changelog.stdout,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
+ stdout=sys.stdout,
+ stderr=sys.stderr,
cwd=os.getcwd()
)
ret = grep_dctrl.wait()
+ if ret:
+ raise Exception(
+ '%s was not successfull, return code was %s ' % (' '.join(cmd), ret)
+ exit_error()
+ )
+
version = grep_dctrl.stdout.read()
version = version.strip()
logger.info('version is %s' % (version))
- stdout_msg = parse_changelog.stdout.read()
- logger.info(stdout_msg)
+ #stdout_msg = parse_changelog.stdout.read()
+ #logger.info(stdout_msg)
if not GIT_COMMITTER_EMAIL:
fh.close()
except:
pass
- atexit.unregister(remove_git_target_workspace)
exit_error()
else:
create_dput_cfg()