Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.admin
Commits
5a6ea947
Commit
5a6ea947
authored
6 years ago
by
Pavel KORSHUNOV
Browse files
Options
Downloads
Patches
Plain Diff
updating finding the latest tag
parent
4f123811
No related branches found
No related tags found
1 merge request
!85
Correcting release script: sorting tags, corrected version bump, updated help docs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
release/release_bob.py
+4
-4
4 additions, 4 deletions
release/release_bob.py
with
4 additions
and
4 deletions
release/release_bob.py
+
4
−
4
View file @
5a6ea947
...
...
@@ -115,9 +115,9 @@ def _update_readme(readme, version=None):
return
'
\n
'
.
join
(
new_readme
)
def
get_latest_tag
(
gitpkg
):
def
get_latest_tag
_name
(
gitpkg
):
# get 50 latest tags as a list
latest_tags
=
gitpkg
.
tags
.
list
(
per_page
=
50
,
page
=
1
)
latest_tags
=
gitpkg
.
tags
.
list
(
all
=
True
)
if
not
latest_tags
:
return
None
# create list of tags' names but ignore the first 'v' character in each name
...
...
@@ -143,7 +143,7 @@ def get_parsed_tag(gitpkg, tag):
if
'
patch
'
==
tag
or
'
minor
'
==
tag
or
'
major
'
==
tag
:
# find the correct latest tag of this package (without 'v' in front),
# None if there are no tags yet
latest_tag_name
=
get_latest_tag
(
gitpkg
)
latest_tag_name
=
get_latest_tag
_name
(
gitpkg
)
# if there were no tags yet, assume the very first version
if
not
latest_tag_name
:
return
'
v0.0.1
'
...
...
@@ -215,7 +215,7 @@ def just_build_package(gitpkg, dry_run=False):
last_pipeline
=
get_last_nonskip_pipeline
(
gitpkg
,
before_last
=
True
)
# check that the chosen pipeline is the one we are looking for
latest_tag_name
=
g
itpkg
.
tags
.
list
(
per_page
=
1
,
page
=
1
)[
0
].
name
latest_tag_name
=
g
et_latest_tag_name
(
gitpkg
)
# the pipeline should be the one built for the latest tag, so check if it is the correct choice
if
last_pipeline
.
ref
!=
latest_tag_name
:
raise
ValueError
(
'
While deploying {0}, found pipeline {1} but it does not match
'
...
...
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