Read version from build settings in build script

This commit is contained in:
Micha
2025-11-20 00:10:31 +01:00
parent 756695c5b0
commit 2b3850440f

View File

@@ -23,7 +23,15 @@ if [[ ! -d "$APP_PATH" ]]; then
exit 1
fi
ZIP_NAME="iKeyMon-$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' \"$APP_PATH/Contents/Info.plist\").zip"
VERSION=$(xcodebuild \
-project "$ROOT_DIR/$PROJECT" \
-scheme "$SCHEME" \
-configuration Release \
-showBuildSettings | awk '/MARKETING_VERSION/ {print $3; exit}')
if [[ -z "$VERSION" ]]; then
VERSION="dev"
fi
ZIP_NAME="iKeyMon-${VERSION}.zip"
pushd "$(dirname "$APP_PATH")" >/dev/null
zip -r "$ARTIFACTS_DIR/$ZIP_NAME" "$(basename "$APP_PATH")"
popd >/dev/null