mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
Fix fedora version format
This commit is contained in:
@@ -192,14 +192,21 @@ 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) {
|
||||||
let baseVersion = "";
|
function extractBaseVersion(value) {
|
||||||
if (cliVersion) {
|
if (!value)
|
||||||
const cliMatch = cliVersion.match(/^([\d.]+)/);
|
return "";
|
||||||
if (cliMatch)
|
let baseMatch = value.match(/(\d+\.\d+\.\d+)/);
|
||||||
baseVersion = cliMatch[1];
|
if (baseMatch)
|
||||||
|
return baseMatch[1];
|
||||||
|
baseMatch = value.match(/(\d+\.\d+)/);
|
||||||
|
if (baseMatch)
|
||||||
|
return baseMatch[1];
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let baseVersion = extractBaseVersion(cliVersion);
|
||||||
if (!baseVersion)
|
if (!baseVersion)
|
||||||
baseVersion = SystemUpdateService.semverVersion || "";
|
baseVersion = extractBaseVersion(SystemUpdateService.semverVersion);
|
||||||
if (baseVersion) {
|
if (baseVersion) {
|
||||||
return `dms (git) v${baseVersion}-${match[1]}`;
|
return `dms (git) v${baseVersion}-${match[1]}`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user