From bf651da5a61fb3bd3f71a09092d7b4112f339a0e Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Sun, 25 Oct 2026 17:32:48 +0100 Subject: [PATCH] update: release.py tags a Debian revision other than 1 as x.y.z-n. --- debian-package/debian/changelog | 10 ++++++++++ release.py | 11 ++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/debian-package/debian/changelog b/debian-package/debian/changelog index 50643c5..3c01c01 100644 --- a/debian-package/debian/changelog +++ b/debian-package/debian/changelog @@ -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 Mon, 26 Oct 2026 14:00:00 +0100 + 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. diff --git a/release.py b/release.py index bce5461..4d798bb 100755 --- a/release.py +++ b/release.py @@ -1,9 +1,9 @@ #!/usr/bin/env python3 """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, -without the Debian revision: vpn-router (0.5.1-1) is tagged 0.5.1, which starts the -release workflow. +The tag is the version of the first entry of debian-package/debian/changelog, without 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 +starts the release workflow. """ import argparse @@ -48,13 +48,14 @@ def summary(): 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] start, end = first.find('('), first.find(')') if start == -1 or end < start: sys.exit(f'{CHANGELOG}: the first line has no version: {first}') 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():