[ci-bitrise] Fix envs and versioning to match this project's actual config

agvtool doesn't apply here — no VERSIONING_SYSTEM set, CURRENT_PROJECT_VERSION
comes from Skip.env (shared with the Android side) via #include in
Darwin/PediFoods.xcconfig. Bump it there instead.

Dropped APPLE_ID, ITC_TEAM_ID and unused BITRISE_DISTRIBUTION_METHOD carried
over from LC Wallet's Fastfile/Appfile shape — none of them are read anywhere
in this project's Appfile or Fastfile.

Added the actual missing piece: DEVELOPMENT_TEAM, which both
Darwin/PediFoods.xcconfig and Darwin/fastlane/AppStore.xcconfig leave blank
on purpose for CI to fill in. Wired BITRISE_DISTRIBUTION_METHOD into
build_app's export_method so it stops being dead config.
This commit is contained in:
Daniel Arantes Loverde
2026-07-09 14:07:57 -03:00
parent 38e641a082
commit ffd7ca6125
2 changed files with 19 additions and 22 deletions

View File

@@ -10,6 +10,7 @@ lane :assemble do |options|
build_app( build_app(
scheme: "PediFoods App", scheme: "PediFoods App",
sdk: "iphoneos", sdk: "iphoneos",
export_method: ENV["BITRISE_DISTRIBUTION_METHOD"] || "app-store",
xcconfig: "fastlane/AppStore.xcconfig", xcconfig: "fastlane/AppStore.xcconfig",
xcargs: "-skipPackagePluginValidation -skipMacroValidation", xcargs: "-skipPackagePluginValidation -skipMacroValidation",
derived_data_path: "../.build/Darwin/DerivedData", derived_data_path: "../.build/Darwin/DerivedData",

View File

@@ -9,21 +9,16 @@ meta:
app: app:
envs: envs:
- BITRISE_PROJECT_PATH: Darwin/PediFoods.xcodeproj
opts:
is_expand: false
- BITRISE_SCHEME: PediFoods App
opts:
is_expand: false
- BITRISE_DISTRIBUTION_METHOD: app-store - BITRISE_DISTRIBUTION_METHOD: app-store
opts: opts:
is_expand: false is_expand: false
- APPLE_ID: developer@loverde.com.br
# MANUAL (Bitrise Secrets tab — never commit these): # MANUAL (Bitrise Secrets tab — never commit these):
# ASC_KEY_ID → App Store Connect API Key ID # ASC_KEY_ID → App Store Connect API Key ID
# ASC_ISSUER_ID → App Store Connect Issuer ID # ASC_ISSUER_ID → App Store Connect Issuer ID
# ASC_KEY_CONTENT → .p8 file content (raw, not base64 — written verbatim into apikey.json) # ASC_KEY_CONTENT → .p8 file content (raw, written verbatim into apikey.json)
# ITC_TEAM_ID → iTunes Connect Team ID (numeric) # DEVELOPMENT_TEAM → Apple Developer Team ID, written into
# Darwin/fastlane/AppStore.xcconfig at build time
# (Darwin/PediFoods.xcconfig leaves it blank on purpose)
# ─── WORKFLOWS ──────────────────────────────────────────────────────────────── # ─── WORKFLOWS ────────────────────────────────────────────────────────────────
workflows: workflows:
@@ -38,11 +33,16 @@ workflows:
inputs: inputs:
- content: | - content: |
cd $BITRISE_SOURCE_DIR cd $BITRISE_SOURCE_DIR
agvtool new-version -all $BITRISE_BUILD_NUMBER # CURRENT_PROJECT_VERSION lives in Skip.env — shared by both
# Darwin/PediFoods.xcconfig and Android/settings.gradle.kts,
# not a standard Xcode "Apple Generic Versioning" setting,
# so agvtool does not apply here.
sed -i '' "s/CURRENT_PROJECT_VERSION = .*/CURRENT_PROJECT_VERSION = $BITRISE_BUILD_NUMBER/" Skip.env
- script@1: - script@1:
title: Write App Store Connect API key title: Write code signing team and App Store Connect API key
inputs: inputs:
- content: | - content: |
echo "DEVELOPMENT_TEAM = $DEVELOPMENT_TEAM" >> "$BITRISE_SOURCE_DIR/Darwin/fastlane/AppStore.xcconfig"
cat > "$BITRISE_SOURCE_DIR/Darwin/fastlane/apikey.json" <<EOF cat > "$BITRISE_SOURCE_DIR/Darwin/fastlane/apikey.json" <<EOF
{"key_id":"$ASC_KEY_ID","issuer_id":"$ASC_ISSUER_ID","key":"$ASC_KEY_CONTENT","in_house":false} {"key_id":"$ASC_KEY_ID","issuer_id":"$ASC_ISSUER_ID","key":"$ASC_KEY_CONTENT","in_house":false}
EOF EOF
@@ -54,33 +54,29 @@ workflows:
# ── Full release → App Store ─────────────────────────────────────────────── # ── Full release → App Store ───────────────────────────────────────────────
release: release:
description: Build, sign, and upload to App Store description: Build, sign, and upload to App Store
envs:
- ASC_KEY_ID: $ASC_KEY_ID
- ASC_ISSUER_ID: $ASC_ISSUER_ID
- ASC_KEY_CONTENT: $ASC_KEY_CONTENT
steps: steps:
- git-clone@8: {} - git-clone@8: {}
- script@1: - script@1:
title: Verify ASC secrets title: Verify secrets
inputs: inputs:
- content: | - content: |
if [ -z "$ASC_KEY_ID" ]; then if [ -z "$ASC_KEY_ID" ] || [ -z "$DEVELOPMENT_TEAM" ]; then
echo "ERROR: ASC_KEY_ID is empty" echo "ERROR: ASC_KEY_ID / ASC_ISSUER_ID / ASC_KEY_CONTENT / DEVELOPMENT_TEAM must be set in Bitrise Secrets"
exit 1 exit 1
fi fi
echo "ASC_KEY_ID is set (length: ${#ASC_KEY_ID})" echo "ASC_KEY_ID is set (length: ${#ASC_KEY_ID})"
echo "ASC_ISSUER_ID is set (length: ${#ASC_ISSUER_ID})" echo "DEVELOPMENT_TEAM is set (length: ${#DEVELOPMENT_TEAM})"
echo "ASC_KEY_CONTENT is set (length: ${#ASC_KEY_CONTENT})"
- script@1: - script@1:
title: Set build number title: Set build number
inputs: inputs:
- content: | - content: |
cd $BITRISE_SOURCE_DIR cd $BITRISE_SOURCE_DIR
agvtool new-version -all $BITRISE_BUILD_NUMBER sed -i '' "s/CURRENT_PROJECT_VERSION = .*/CURRENT_PROJECT_VERSION = $BITRISE_BUILD_NUMBER/" Skip.env
- script@1: - script@1:
title: Write App Store Connect API key title: Write code signing team and App Store Connect API key
inputs: inputs:
- content: | - content: |
echo "DEVELOPMENT_TEAM = $DEVELOPMENT_TEAM" >> "$BITRISE_SOURCE_DIR/Darwin/fastlane/AppStore.xcconfig"
cat > "$BITRISE_SOURCE_DIR/Darwin/fastlane/apikey.json" <<EOF cat > "$BITRISE_SOURCE_DIR/Darwin/fastlane/apikey.json" <<EOF
{"key_id":"$ASC_KEY_ID","issuer_id":"$ASC_ISSUER_ID","key":"$ASC_KEY_CONTENT","in_house":false} {"key_id":"$ASC_KEY_ID","issuer_id":"$ASC_ISSUER_ID","key":"$ASC_KEY_CONTENT","in_house":false}
EOF EOF