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
7696f6fe
Commit
7696f6fe
authored
3 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
[release] Fix readme update (still related to
#78
)
parent
2e47e4b2
No related branches found
No related tags found
No related merge requests found
Pipeline
#52401
passed
3 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/devtools/release.py
+3
-3
3 additions, 3 deletions
bob/devtools/release.py
with
3 additions
and
3 deletions
bob/devtools/release.py
+
3
−
3
View file @
7696f6fe
...
@@ -96,7 +96,7 @@ def _update_readme(readme, version):
...
@@ -96,7 +96,7 @@ def _update_readme(readme, version):
"""
"""
# replace the badge in the readme's text with the given version
# replace the badge in the readme's text with the given version
DOC_IMAGE
=
re
.
compile
(
r
"
\-(
stable
|(v\d+\.\d+\.\d+([abc]\d+)?))\-
"
)
DOC_IMAGE
=
re
.
compile
(
r
"
\-(
available|master|latest
|(v\d+\.\d+\.\d+([abc]\d+)?))\-
"
)
BRANCH_RE
=
re
.
compile
(
r
"
/(stable|master|(v\d+\.\d+\.\d+([abc]\d+)?))
"
)
BRANCH_RE
=
re
.
compile
(
r
"
/(stable|master|(v\d+\.\d+\.\d+([abc]\d+)?))
"
)
new_readme
=
[]
new_readme
=
[]
...
@@ -106,10 +106,10 @@ def _update_readme(readme, version):
...
@@ -106,10 +106,10 @@ def _update_readme(readme, version):
replacement
=
"
/v%s
"
%
version
if
version
is
not
None
else
"
/master
"
replacement
=
"
/v%s
"
%
version
if
version
is
not
None
else
"
/master
"
line
=
BRANCH_RE
.
sub
(
replacement
,
line
)
line
=
BRANCH_RE
.
sub
(
replacement
,
line
)
if
(
"
software/bob
"
in
line
)
or
(
"
software/beat
"
in
line
):
# our doc server
if
(
"
software/bob
"
in
line
)
or
(
"
software/beat
"
in
line
):
# our doc server
replacement
=
"
/v%s
"
%
version
if
version
is
not
None
else
"
/
stable
"
replacement
=
"
/v%s
"
%
version
if
version
is
not
None
else
"
/
master
"
line
=
BRANCH_RE
.
sub
(
replacement
,
line
)
line
=
BRANCH_RE
.
sub
(
replacement
,
line
)
if
DOC_IMAGE
.
search
(
line
)
is
not
None
:
if
DOC_IMAGE
.
search
(
line
)
is
not
None
:
replacement
=
"
-v%s-
"
%
version
if
version
is
not
None
else
"
-
stable
-
"
replacement
=
"
-v%s-
"
%
version
if
version
is
not
None
else
"
-
latest
-
"
line
=
DOC_IMAGE
.
sub
(
replacement
,
line
)
line
=
DOC_IMAGE
.
sub
(
replacement
,
line
)
new_readme
.
append
(
line
)
new_readme
.
append
(
line
)
return
"
\n
"
.
join
(
new_readme
)
+
"
\n
"
return
"
\n
"
.
join
(
new_readme
)
+
"
\n
"
...
...
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