diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 260590a..cae851f 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -54,9 +54,16 @@ jobs: - name: Generate app metadata run: | - VERSION="1.0" + # Read the version from the built app's Info.plist so it can never + # drift from MARKETING_VERSION in the pbxproj. SideStore only shows an + # update when the version changes, so a stale hardcoded version here + # silently hides new builds. + APP_PATH=$(find build/Build/Products -name "*.app" -type d | head -1) + VERSION=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "$APP_PATH/Info.plist") + BUILD=$(/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" "$APP_PATH/Info.plist") SIZE=$(stat -f%z $APP_NAME.ipa) DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") + echo "version=$VERSION build=$BUILD" # Per-app metadata file. The perlis aggregator folds this into the # root source.json at https://apps.bueso.eu/source.json. cat > $APP_NAME.json <