diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index c6474e04..ff2b886c 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -471,26 +471,15 @@ jobs: working-directory: wivrn/monado-src run: ../patches/apply.sh ../patches/monado/* - - name: Edit changelog (nightly) - if: ${{ ! startsWith(github.ref, 'refs/tags/') }} - working-directory: wivrn/debian - run: | - mv changelog changelog.orig - echo "wivrn ("$( (git describe --tags || echo 0) | sed s/^v//)") "${{ matrix.distro }}"; urgency=medium" > changelog - echo "" >> changelog - echo " * Nightly build" >> changelog - echo "" >> changelog - echo " -- github-actions <41898282+github-actions@users.noreply.github.com> "$(date -R) >> changelog - echo "" >> changelog - cat changelog.orig | sed s/unstable/${{ matrix.distro }}/ >> changelog - cat changelog - - - name: Edit changelog (release) - if: ${{ ! startsWith(github.ref, 'refs/tags/') }} - working-directory: wivrn/debian - run: | - sed -i s/unstable/${{ matrix.distro }}/ changelog - cat changelog + - name: Edit changelog + working-directory: wivrn + run: > + tools/gen_debian_changelog.py + --out debian/changelog + ${{ (startsWith(github.ref, 'refs/tags/') && '' ) || '--nightly' }} + --author "github-actions <41898282+github-actions@users.noreply.github.com>" + --distribution "${{ matrix.distro }}"; + cat debian/changelog - name: Build package working-directory: wivrn diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index f1a9087b..00000000 --- a/debian/changelog +++ /dev/null @@ -1,53 +0,0 @@ -wivrn (0.24-1) unstable; urgency=medium - - * Improved framerate for applications that can't reach the target refresh rate - * Optional auto-selection of refresh rate based on application performance - * AV1 support for nvenc - * Improved nvenc parameters, for better quality and lower latency - * Expose the actual controller on PC side, with fallback to Oculus Touch - - -- Patrick Nicolas Fri, 04 Apr 2025 18:52:05 +0200 - -wivrn (0.23-1) unstable; urgency=medium - - * New dashboard, built on Kirigami - * Improved controller tracking - * Forward visibility mask and framerate change (OpenXR features) - * H.264 Vulkan video encode works on Radeon - * Face tracking support on HTC headsets - * Allow updating bitrate at runtime, works on vulkan video and x264 only - * Various performance improvements - - -- Patrick Nicolas Sat, 08 Feb 2025 11:40:41 +0100 - -wivrn (0.22-1) unstable; urgency=medium - - * Passthrough streaming support - * Fully encrypted connection - * Improved compositor pacing - * Add wivrnctl utility to control server - - -- Patrick Nicolas Thu, 05 Dec 2024 22:20:41 +0100 - -wivrn (0.21-1) unstable; urgency=medium - - * Fixed multiple dashboard issues - - Missing tray icon - - Uncaught exception if the model property is not set on the android device - - Uncaught exception if the Steam app manifest does not exist - - Assertion failure when the settings window is opened a second time - - Avoid double error message if the server fails to start - - Correctly set the app id for non-Steam games that are added in the Steam library - * Improved compositor pacing - * Changed default encoder configuration - * Inhibit sleeping while a session is active - * Avahi publication is now optional - * Always set the active runtime even if there was already one - - -- Guillaume Meunier Sun, 03 Nov 2024 14:35:12 +0100 - -wivrn (0.20-1) unstable; urgency=medium - - * Initial release. - - -- Guillaume Meunier Mon, 28 Oct 2024 13:28:10 +0100 diff --git a/tools/gen_debian_changelog.py b/tools/gen_debian_changelog.py new file mode 100755 index 00000000..6ab41130 --- /dev/null +++ b/tools/gen_debian_changelog.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 + +import xml.etree.ElementTree as ET +import argparse +import os +import sys +import typing +import datetime +import email.utils +import subprocess + +HEADER = """wivrn ({version}-1) {distribution}; urgency=medium + +""" + +ITEM = """ * {text} +""" + +FOOTER = """ + -- {author} {date} + +""" + +def write_entry( + out: typing.TextIO, + version: str, + data: list[str], + author: str, + distribution: str, + date: datetime.datetime + ) -> None: + out.write(HEADER.format(version=version, distribution=distribution)) + for item in data: + out.write(ITEM.format(text=item)) + out.write(FOOTER.format(author=author, date=email.utils.format_datetime(date))) + + +def main(): + parser = argparse.ArgumentParser("Metainfo to Debian changelog") + parser.add_argument("--metainfo", type=argparse.FileType("r")) + parser.add_argument("--out", type=argparse.FileType("w"), default=sys.stdout) + parser.add_argument("--nightly", action="store_true") + parser.add_argument("--author", required=True) + parser.add_argument("--distribution", required=True) + + args = parser.parse_args() + + if not args.metainfo: + args.metainfo = open(os.path.join(os.path.dirname(__file__), "../dashboard/io.github.wivrn.wivrn.metainfo.xml")) + + tree = ET.parse(args.metainfo) + + if args.nightly: + version = subprocess.check_output(["git", "describe", "--tags"]).decode().strip() + version = version[1:] # remove the initial "v" + write_entry( + out=args.out, + version=version, + data=["Nightly build"], + author=args.author, + distribution=args.distribution, + date=datetime.datetime.now() + ) + + + for release in tree.find("releases").findall("release"): + write_entry( + out=args.out, + version=release.get("version"), + data=[item.text for item in release.findall("description/ul/li")], + author=args.author, + distribution=args.distribution, + date=datetime.datetime.fromisoformat(release.get("date")) + ) + + +if __name__ == "__main__": + main()