From 993216e1574913b9386d24a7fe9d8c21de13c90c Mon Sep 17 00:00:00 2001 From: purian23 Date: Thu, 15 Jan 2026 22:30:20 -0500 Subject: [PATCH] distro: Update Fedora dynamic versioning --- quickshell/Modules/Settings/AboutTab.qml | 30 +++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/quickshell/Modules/Settings/AboutTab.qml b/quickshell/Modules/Settings/AboutTab.qml index 792bdda7..f79477ae 100644 --- a/quickshell/Modules/Settings/AboutTab.qml +++ b/quickshell/Modules/Settings/AboutTab.qml @@ -177,10 +177,11 @@ Item { StyledText { text: { - if (!SystemUpdateService.shellVersion) + if (!SystemUpdateService.shellVersion && !DMSService.cliVersion) return "dms"; - let version = SystemUpdateService.shellVersion; + let version = SystemUpdateService.shellVersion || ""; + let cliVersion = DMSService.cliVersion || ""; // Debian/Ubuntu/OpenSUSE git format: 1.0.3+git2264.c5c5ce84 let match = version.match(/^([\d.]+)\+git(\d+)\./); @@ -191,7 +192,18 @@ Item { // Fedora COPR git format: 0.0.git.2267.d430cae9 match = version.match(/^[\d.]+\.git\.(\d+)\./); if (match) { - return `dms (git) v1.0.3-${match[1]}`; + let baseVersion = ""; + if (cliVersion) { + const cliMatch = cliVersion.match(/^([\d.]+)/); + if (cliMatch) + baseVersion = cliMatch[1]; + } + if (!baseVersion) + baseVersion = SystemUpdateService.semverVersion || ""; + if (baseVersion) { + return `dms (git) v${baseVersion}-${match[1]}`; + } + return `dms (git) v${match[1]}`; } // Stable release format: 1.0.3 @@ -200,6 +212,18 @@ Item { return `dms v${match[1]}`; } + if (!version && cliVersion) { + match = cliVersion.match(/^([\d.]+)\+git(\d+)\./); + if (match) { + return `dms (git) v${match[1]}-${match[2]}`; + } + match = cliVersion.match(/^([\d.]+)$/); + if (match) { + return `dms v${match[1]}`; + } + return `dms ${cliVersion}`; + } + return `dms ${version}`; } font.pixelSize: Theme.fontSizeXLarge