update: release.py tags a Debian revision other than 1 as x.y.z-n.
Release / release (push) Successful in 19s

This commit is contained in:
slawek committed 2026-10-25 17:32:48 +01:00
1 parent 4a5b15a559
commit bf651da5a6
2 files changed
+16 -5

No files matched your search

+10
View File
@@ -1,3 +1,13 @@
vpn-router (0.18.0-2) unstable; urgency=medium
update: release.py tags a Debian revision other than 1 as x.y.z-n.
* release.py tags the newest entry x.y.z for the Debian revision 1 and
x.y.z-n for a later revision, so a packaging change gets a release
of its own.
-- Slawomir Koszewski <slawek@koszewscy.waw.pl> Mon, 26 Oct 2026 14:00:00 +0100
vpn-router (0.18.0-1) unstable; urgency=medium vpn-router (0.18.0-1) unstable; urgency=medium
feature: site_to_site holds any number of named site-to-site connections, which /site-to-site lists, adds, changes and removes. feature: site_to_site holds any number of named site-to-site connections, which /site-to-site lists, adds, changes and removes.
+6 -5
View File
@@ -1,9 +1,9 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Commit everything, tag the version of the newest changelog entry and push main with the tags. """Commit everything, tag the version of the newest changelog entry and push main with the tags.
The tag is the upstream version of the first entry of debian-package/debian/changelog, The tag is the version of the first entry of debian-package/debian/changelog, without the
without the Debian revision: vpn-router (0.5.1-1) is tagged 0.5.1, which starts the Debian revision 1: vpn-router (0.5.1-1) is tagged 0.5.1 and (0.5.1-2) 0.5.1-2. The tag
release workflow. starts the release workflow.
""" """
import argparse import argparse
@@ -48,13 +48,14 @@ def summary():
def version(): def version():
"""The upstream version of the first changelog entry.""" """The tag of the first changelog entry: its version, without the Debian revision when that is 1."""
first = CHANGELOG.read_text(encoding='utf-8').splitlines()[0] first = CHANGELOG.read_text(encoding='utf-8').splitlines()[0]
start, end = first.find('('), first.find(')') start, end = first.find('('), first.find(')')
if start == -1 or end < start: if start == -1 or end < start:
sys.exit(f'{CHANGELOG}: the first line has no version: {first}') sys.exit(f'{CHANGELOG}: the first line has no version: {first}')
full = first[start + 1:end] full = first[start + 1:end]
return full.rsplit('-', 1)[0] if '-' in full else full upstream, _, revision = full.rpartition('-')
return upstream if upstream and revision == '1' else full
def main(): def main():