Skip to content
Snippets Groups Projects
Commit 12216c5d authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

[release] improve the release command examples

parent ebab6d60
No related branches found
No related tags found
1 merge request!145Improve the release scripts
Pipeline #37432 passed
......@@ -22,28 +22,28 @@ Examples:
1. Releases a single package:
$ bdt gitlab release --package=bob.package.xyz changelog.md
$ bdt gitlab release -vvv --package=bob/bob.package.xyz changelog.md
2. If there is a single package in the ``changelog.md`` file, the flag
``--package`` is not required:
$ bdt gitlab release changelog.md
$ bdt gitlab release -vvv changelog.md
2. Releases the whole of bob using `changelog_since_last_release.md`:
2. Releases the whole of bob using `changelog.md`:
$ bdt gitlab release bob/devtools/data/changelog_since_last_release.md
$ bdt gitlab release -vvv changelog.md
3. In case of errors, resume the release of the whole of Bob:
$ bdt gitlab release --resume bob/devtools/data/changelog_since_last_release.md
$ bdt gitlab release -vvv --resume --package=bob/bob.package.xyz changelog.md
4. The option `-dry-run` can be used to let the script print what it would do instead of actually doing it:
$ bdt gitlab release --dry-run changelog_since_last_release.md
$ bdt gitlab release -vvv --dry-run changelog.md
"""
)
@click.argument("changelog", type=click.File("rt", lazy=False))
......@@ -162,9 +162,7 @@ def release(changelog, group, package, resume, dry_run):
if package:
# get the index where the package first appears in the list
start_idx = [
i
for i, line in enumerate(changelogs)
if line[1:].strip() == package
i for i, line in enumerate(changelogs) if line[1:].strip() == package
]
if not start_idx:
......@@ -201,9 +199,7 @@ def release(changelog, group, package, resume, dry_run):
# release the package with the found tag and its comments
if use_package:
pipeline_id = release_package(
use_package, tag, tag_comments, dry_run
)
pipeline_id = release_package(use_package, tag, tag_comments, dry_run)
# now, wait for the pipeline to finish, before we can release the
# next package
wait_for_pipeline_to_finish(use_package, pipeline_id, dry_run)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment