Skip to content

Commit

Permalink
Migrate to new command-runner function
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Oct 11, 2023
1 parent 11a6087 commit 04dba87
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions dev_tools/git_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,17 +633,21 @@ def main(args):
assert get_branch_name(args) == "main"
## FIXME git merge command below does NOT merge anything...
raise NotImplementedError("git merge functionality is broken... it cannot merge the develop branch into main")
stdout, stderr = run_cmd("git merge {0} -m '{1}'".format(original_branch_name, args.message), debug=args.debug)
stdout, stderr = run_cmd("git push origin main", debug=args.debug)

cmd = f"git merge {original_branch_name} -m '{args.message}'"
return_code, stdout, stderr = ciscoconfparse.ccp_util.run_this_posix_command(cmd)

cmd = "git push origin main"
return_code, stdout, stderr = ciscoconfparse.ccp_util.run_this_posix_command(cmd)

if args.tag is True:
stdout, stderr = run_cmd("git push origin main --tags", debug=args.debug)
cmd = "git push origin main --tags"
return_code, stdout, stderr = ciscoconfparse.ccp_util.run_this_posix_command(cmd)

if original_branch_name != "main":
args.branch = original_branch_name
git_checkout_branch(args)


if __name__ == "__main__":
args = parse_args()
main(args)
Expand Down

0 comments on commit 04dba87

Please sign in to comment.