versionKey improved

If `versionKey` is used as part of `valuesfromarguments` it will currently be replaced by our standard value `CFBundleShortVersionString` (it was only testet on labels). So added an `if...then` to know if it was already set as part of the arguments.
Also improved logging to show what `versionKey` is.
This commit is contained in:
Søren Theilgaard
2022-01-19 14:36:05 +01:00
parent 83459a83d6
commit 49337a4ae8
2 changed files with 6 additions and 5 deletions

View File

@@ -52,8 +52,9 @@ if [[ $DEBUG -gt 0 ]]; then
fi
# How we get version number from app
# (alternative is "CFBundleVersion", that can be used in labels)
versionKey="CFBundleShortVersionString"
if [[ -z $versionKey ]]; then
versionKey="CFBundleShortVersionString"
fi
# get current user
currentUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ { print $3 }')