Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.devtools
Commits
12216c5d
Commit
12216c5d
authored
5 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
[release] improve the release command examples
parent
ebab6d60
No related branches found
No related tags found
1 merge request
!145
Improve the release scripts
Pipeline
#37432
passed
5 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/devtools/scripts/release.py
+8
-12
8 additions, 12 deletions
bob/devtools/scripts/release.py
with
8 additions
and
12 deletions
bob/devtools/scripts/release.py
+
8
−
12
View file @
12216c5d
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment