1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-26 14:32:52 -05:00

version in about tab and ci

This commit is contained in:
bbedward
2025-10-03 19:31:07 -04:00
parent f96e3b04be
commit 90854e1dd4
3 changed files with 60 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ Singleton {
property string pkgManager: ""
property string distribution: ""
property bool distributionSupported: false
property string shellVersion: ""
readonly property list<string> supportedDistributions: ["arch", "cachyos", "manjaro", "endeavouros"]
readonly property int updateCount: availableUpdates.length
@@ -43,6 +44,23 @@ Singleton {
}
stdout: StdioCollector {}
Component.onCompleted: {
versionDetection.running = true
}
}
Process {
id: versionDetection
command: ["sh", "-c", "if [ -d .git ]; then echo \"(git) $(git rev-parse --short HEAD)\"; elif [ -f VERSION ]; then cat VERSION; fi"]
onExited: (exitCode) => {
if (exitCode === 0) {
shellVersion = stdout.text.trim()
}
}
stdout: StdioCollector {}
}
Process {