[macos-runner] Fix build number bump - agvtool was silently no-oping
Upload rejected with "bundle version must be higher than previously uploaded version: 1" - agvtool new-version requires VERSIONING_SYSTEM = apple-generic, which this project never sets, so it did nothing every run despite reporting success. Pass CURRENT_PROJECT_VERSION directly via xcargs instead, parameterized from the job's run number.
This commit is contained in:
@@ -20,6 +20,7 @@ jobs:
|
|||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
ITC_TEAM_ID: ${{ secrets.ITC_TEAM_ID }}
|
ITC_TEAM_ID: ${{ secrets.ITC_TEAM_ID }}
|
||||||
DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }}
|
DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }}
|
||||||
|
BUILD_NUMBER: ${{ gitea.run_number }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -32,11 +33,6 @@ jobs:
|
|||||||
git -c credential.helper= -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" .
|
git -c credential.helper= -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" .
|
||||||
git checkout "${{ gitea.sha }}"
|
git checkout "${{ gitea.sha }}"
|
||||||
|
|
||||||
- name: Set build number
|
|
||||||
run: |
|
|
||||||
cd Darwin
|
|
||||||
agvtool new-version -all ${{ gitea.run_number }}
|
|
||||||
|
|
||||||
- name: Write App Store Connect API key
|
- name: Write App Store Connect API key
|
||||||
run: |
|
run: |
|
||||||
cat > Darwin/fastlane/apikey.json <<EOF
|
cat > Darwin/fastlane/apikey.json <<EOF
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ jobs:
|
|||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
ITC_TEAM_ID: ${{ secrets.ITC_TEAM_ID }}
|
ITC_TEAM_ID: ${{ secrets.ITC_TEAM_ID }}
|
||||||
DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }}
|
DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }}
|
||||||
|
BUILD_NUMBER: ${{ gitea.run_number }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -39,11 +40,6 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Set build number
|
|
||||||
run: |
|
|
||||||
cd Darwin
|
|
||||||
agvtool new-version -all ${{ gitea.run_number }}
|
|
||||||
|
|
||||||
- name: Write App Store Connect API key
|
- name: Write App Store Connect API key
|
||||||
run: |
|
run: |
|
||||||
cat > Darwin/fastlane/apikey.json <<EOF
|
cat > Darwin/fastlane/apikey.json <<EOF
|
||||||
|
|||||||
@@ -17,12 +17,17 @@ lane :assemble do |options|
|
|||||||
# scope a global override to just one target, and update_code_signing_settings
|
# scope a global override to just one target, and update_code_signing_settings
|
||||||
# itself can't parse this project's newer .pbxproj format anyway (gem
|
# itself can't parse this project's newer .pbxproj format anyway (gem
|
||||||
# limitation, not fixable by updating the gem).
|
# limitation, not fixable by updating the gem).
|
||||||
|
# agvtool needs VERSIONING_SYSTEM = apple-generic, which this project doesn't
|
||||||
|
# set, so it silently no-ops - pass CURRENT_PROJECT_VERSION directly instead.
|
||||||
|
xcargs = "-skipPackagePluginValidation -skipMacroValidation"
|
||||||
|
xcargs += " CURRENT_PROJECT_VERSION=#{ENV['BUILD_NUMBER']}" if ENV["BUILD_NUMBER"]
|
||||||
|
|
||||||
build_app(
|
build_app(
|
||||||
scheme: "PediFoods App",
|
scheme: "PediFoods App",
|
||||||
sdk: "iphoneos",
|
sdk: "iphoneos",
|
||||||
export_method: ENV["BITRISE_DISTRIBUTION_METHOD"] || "app-store",
|
export_method: ENV["BITRISE_DISTRIBUTION_METHOD"] || "app-store",
|
||||||
xcconfig: "fastlane/AppStore.xcconfig",
|
xcconfig: "fastlane/AppStore.xcconfig",
|
||||||
xcargs: "-skipPackagePluginValidation -skipMacroValidation",
|
xcargs: xcargs,
|
||||||
derived_data_path: "../.build/Darwin/DerivedData",
|
derived_data_path: "../.build/Darwin/DerivedData",
|
||||||
output_directory: "../.build/fastlane/Darwin",
|
output_directory: "../.build/fastlane/Darwin",
|
||||||
skip_archive: ENV["FASTLANE_SKIP_ARCHIVE"] == "YES",
|
skip_archive: ENV["FASTLANE_SKIP_ARCHIVE"] == "YES",
|
||||||
|
|||||||
Reference in New Issue
Block a user