Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
92a88225
Unverified
Commit
92a88225
authored
3 years ago
by
Erik Johnston
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Change release script to update debian changelog for RCs (#10465)
parent
6e227564
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/10465.misc
+1
-0
1 addition, 0 deletions
changelog.d/10465.misc
scripts-dev/release.py
+20
-6
20 additions, 6 deletions
scripts-dev/release.py
with
21 additions
and
6 deletions
changelog.d/10465.misc
0 → 100644
+
1
−
0
View file @
92a88225
Fix release script to correctly version debian changelog when doing RCs.
This diff is collapsed.
Click to expand it.
scripts-dev/release.py
+
20
−
6
View file @
92a88225
...
...
@@ -139,6 +139,11 @@ def run():
# Switch to the release branch.
parsed_new_version
=
version
.
parse
(
new_version
)
# We assume for debian changelogs that we only do RCs or full releases.
assert
not
parsed_new_version
.
is_devrelease
assert
not
parsed_new_version
.
is_postrelease
release_branch_name
=
(
f
"
release-v
{
parsed_new_version
.
major
}
.
{
parsed_new_version
.
minor
}
"
)
...
...
@@ -190,12 +195,21 @@ def run():
# Generate changelogs
subprocess
.
run
(
"
python3 -m towncrier
"
,
shell
=
True
)
# Generate debian changelogs if its not an RC.
if
not
rc
:
subprocess
.
run
(
f
'
dch -M -v
{
new_version
}
"
New synapse release
{
new_version
}
.
"'
,
shell
=
True
)
subprocess
.
run
(
'
dch -M -r -D stable
""'
,
shell
=
True
)
# Generate debian changelogs
if
parsed_new_version
.
pre
is
not
None
:
# If this is an RC then we need to coerce the version string to match
# Debian norms, e.g. 1.39.0rc2 gets converted to 1.39.0~rc2.
base_ver
=
parsed_new_version
.
base_version
pre_type
,
pre_num
=
parsed_new_version
.
pre
debian_version
=
f
"
{
base_ver
}
~
{
pre_type
}{
pre_num
}
"
else
:
debian_version
=
new_version
subprocess
.
run
(
f
'
dch -M -v
{
debian_version
}
"
New synapse release
{
debian_version
}
.
"'
,
shell
=
True
,
)
subprocess
.
run
(
'
dch -M -r -D stable
""'
,
shell
=
True
)
# Show the user the changes and ask if they want to edit the change log.
repo
.
git
.
add
(
"
-u
"
)
...
...
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