add --stable-branch option to new-release
Change-Id: I5bcc2ab4e130289b456f165a4feb6ab1a33c8d24 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
306e3fe1d2
commit
0c688306c9
@ -176,6 +176,11 @@ repositories are included in the new release unless their HEAD version
|
||||
matches the most recent release from that repository. To re-tag in
|
||||
those cases, use the --force option.
|
||||
|
||||
Use the --stable-branch option to also create a stable branch for the
|
||||
new release. Projects following the cycle-with-milestones release
|
||||
model automatically receive a new stable branch on their first release
|
||||
candidate.
|
||||
|
||||
Requesting a Branch
|
||||
===================
|
||||
|
||||
|
@ -111,13 +111,6 @@ def get_last_release(deliverable_info, series, deliverable, release_type):
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
'--force',
|
||||
default=False,
|
||||
action='store_true',
|
||||
help=('force a new tag, even if the HEAD of the '
|
||||
'branch is already tagged'),
|
||||
)
|
||||
parser.add_argument(
|
||||
'series',
|
||||
help='the name of the release series to scan',
|
||||
@ -139,6 +132,19 @@ def main():
|
||||
action='store_false',
|
||||
help='do not remove temporary files',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--force',
|
||||
default=False,
|
||||
action='store_true',
|
||||
help=('force a new tag, even if the HEAD of the '
|
||||
'branch is already tagged'),
|
||||
)
|
||||
parser.add_argument(
|
||||
'--stable-branch',
|
||||
default=False,
|
||||
action='store_true',
|
||||
help='create a new stable branch from the release',
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
force_tag = args.force
|
||||
@ -179,7 +185,7 @@ def main():
|
||||
parser.error(err)
|
||||
last_version = last_release['version'].split('.')
|
||||
|
||||
first_rc = False
|
||||
add_stable_branch = args.stable_branch
|
||||
if args.release_type in ('milestone', 'rc'):
|
||||
force_tag = True
|
||||
if deliverable_info['release-model'] != 'cycle-with-milestones':
|
||||
@ -191,7 +197,7 @@ def main():
|
||||
# release candidate, so figure out if that is what this
|
||||
# release will be.
|
||||
if args.release_type == 'rc' and new_version_parts[-1][3:] == '1':
|
||||
first_rc = True
|
||||
add_stable_branch = True
|
||||
else:
|
||||
increment = {
|
||||
'bugfix': (0, 0, 1),
|
||||
@ -235,7 +241,7 @@ def main():
|
||||
'version': new_version,
|
||||
'projects': projects,
|
||||
})
|
||||
if first_rc:
|
||||
if add_stable_branch:
|
||||
deliverable_info.setdefault('branches', []).append({
|
||||
'name': 'stable/{}'.format(series),
|
||||
'location': new_version,
|
||||
|
Loading…
Reference in New Issue
Block a user