Skip to content

Commit 47cd07e

Browse files
xylixErikBjare
authored andcommitted
Use git describe --tags --abbrev=0 to retrieve current activitywatch version in aw.spec
1 parent 9cc8508 commit 47cd07e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

aw.spec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33

44
import os
55
import platform
6+
import subprocess
67
import aw_core
78
import flask_restx
89

10+
git_cmd = "git describe --tags --abbrev=0"
11+
current_release = subprocess.run(git_cmd.split(" "), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding="utf8").stdout.strip()
12+
print("bundling activitywatch version " + current_release)
13+
914
aw_core_path = os.path.dirname(aw_core.__file__)
1015
restx_path = os.path.dirname(flask_restx.__file__)
1116

@@ -195,4 +200,4 @@ if platform.system() == "Darwin":
195200
info_plist={"CFBundleExecutable": "MacOS/aw-qt",
196201
"CFBundleIconFile": "logo.icns",
197202
# TODO: Get the right version here
198-
"CFBundleShortVersionString": "0.9.0"})
203+
"CFBundleShortVersionString": current_release })

0 commit comments

Comments
 (0)