Commit fb65b61f authored by MEESSEN Christophe's avatar MEESSEN Christophe
Browse files

add start_bugfix and close_bugfix support

parent 1d782449
......@@ -195,6 +195,26 @@ def select_identifier(branchType):
return identifier
def close_bugfix():
"""Close the bugfix cycle.
"""
print "Close the bugfix cycle..."
identifier = select_identifier("bugfix")
if not identifier:
sys.exit(0)
branch = "bugfix-%s" % identifier
git("checkout develop")
git("merge --no-ff", branch)
rep = raw_input("Delete the locale branch %s [y/N]" % branch)
if rep == 'y':
git("branch -d", branch)
def close_feature():
"""Close the feature cycle.
......@@ -495,6 +515,29 @@ def sphinx(*args, **kwargs):
call(cmd, **kwargs)
def start_bugfix():
"""Start the bugfix cycle.
"""
print "Start the bugfix cycle..."
issueNumber = raw_input("Enter the bugfix issue number [None]:")
if issueNumber and not issueNumber.isdigit():
print "The issue number must be a number"
sys.exit(-1)
rep = raw_input("Enter the bugfix identifier:")
if not rep:
sys.exit(0)
if not issueNumber:
branch = "bugfix-%s" % rep
else
branch = "bugfix-%s-%s" % [issueNumber, rep]
git("checkout -b", branch, "develop")
def start_feature():
"""Start the feature cycle.
......@@ -577,6 +620,11 @@ if __name__ == '__main__':
dest="api_pdf",
help="build the API documentation in PDF.")
OPS.add_option("--start-bugfix",
action="store_true",
dest="start_bugfix",
help="start the bugfix cycle.")
OPS.add_option("--start-feature",
action="store_true",
dest="start_feature",
......@@ -602,6 +650,11 @@ if __name__ == '__main__':
dest="close_feature",
help="close the feature branch cycle.")
OPS.add_option("--close-bugfix",
action="store_true",
dest="close_bugfix",
help="close the bugfix branch cycle.")
OPS.add_option("--close-release",
action="store_true",
dest="close_release",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment