Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
limbra
limbra
Commits
fb65b61f
Commit
fb65b61f
authored
Apr 24, 2015
by
MEESSEN Christophe
Browse files
add start_bugfix and close_bugfix support
parent
1d782449
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
build_version.py
build_version.py
+53
-0
No files found.
build_version.py
View file @
fb65b61f
...
...
@@ -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"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment