mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
distro: Update Fedora dynamic versioning
This commit is contained in:
@@ -177,10 +177,11 @@ Item {
|
|||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: {
|
text: {
|
||||||
if (!SystemUpdateService.shellVersion)
|
if (!SystemUpdateService.shellVersion && !DMSService.cliVersion)
|
||||||
return "dms";
|
return "dms";
|
||||||
|
|
||||||
let version = SystemUpdateService.shellVersion;
|
let version = SystemUpdateService.shellVersion || "";
|
||||||
|
let cliVersion = DMSService.cliVersion || "";
|
||||||
|
|
||||||
// Debian/Ubuntu/OpenSUSE git format: 1.0.3+git2264.c5c5ce84
|
// Debian/Ubuntu/OpenSUSE git format: 1.0.3+git2264.c5c5ce84
|
||||||
let match = version.match(/^([\d.]+)\+git(\d+)\./);
|
let match = version.match(/^([\d.]+)\+git(\d+)\./);
|
||||||
@@ -191,7 +192,18 @@ Item {
|
|||||||
// Fedora COPR git format: 0.0.git.2267.d430cae9
|
// Fedora COPR git format: 0.0.git.2267.d430cae9
|
||||||
match = version.match(/^[\d.]+\.git\.(\d+)\./);
|
match = version.match(/^[\d.]+\.git\.(\d+)\./);
|
||||||
if (match) {
|
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
|
// Stable release format: 1.0.3
|
||||||
@@ -200,6 +212,18 @@ Item {
|
|||||||
return `dms v${match[1]}`;
|
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}`;
|
return `dms ${version}`;
|
||||||
}
|
}
|
||||||
font.pixelSize: Theme.fontSizeXLarge
|
font.pixelSize: Theme.fontSizeXLarge
|
||||||
|
|||||||
Reference in New Issue
Block a user