Files
swiftcontrol/android/fastlane/Fastfile
Jonas Bark 57a530acbc Make metadata download/commit-back robust
- Android download: 'supply init' won't overwrite existing metadata (it printed
  'Metadata already exists ...' and downloaded nothing), so clear the folder
  first to actually re-pull the live Google Play listing.
- Commit-back: rebase onto FETCH_HEAD instead of origin/6.1 (the remote-tracking
  ref doesn't exist after 'git fetch origin 6.1', which failed the iOS job with
  'invalid upstream origin/6.1'), and retry the push so the two parallel jobs
  (disjoint android/ vs ios/ paths) converge.
- Drop the auto app-repo submodule-pointer bump (racy across the two jobs); the
  metadata still lands in prop@6.1. Bump the pointer separately if needed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 10:09:42 +02:00

55 lines
2.3 KiB
Ruby

# Fastlane configuration for the Google Play Store listing (Android).
#
# Manages the localized store metadata (title, descriptions, ...). The listing
# text lives in the private `prop` submodule under
# prop/store_metadata/android/<locale>/ so it is not exposed in the public repo.
# The app binary (AAB) is still uploaded by the regular build workflow, so these
# lanes never touch it.
default_platform(:android)
# fastlane chdir's into the fastlane/ folder before running a lane, so relative
# paths resolve against android/fastlane/. Anchor everything at the repo root
# instead (GITHUB_WORKSPACE in CI; two levels up from this file locally).
ROOT = ENV["GITHUB_WORKSPACE"] || File.expand_path("../..", __dir__)
PACKAGE_NAME = "de.jonasbark.swiftcontrol"
JSON_KEY = ENV["SUPPLY_JSON_KEY_FILE"] || File.join(ROOT, "android/fastlane/service-account.json")
METADATA = File.join(ROOT, "prop/store_metadata/android") # private submodule
platform :android do
desc "Upload the localized store listing texts & screenshots to Google Play (no binary, no changelogs)"
lane :upload_metadata do
upload_to_play_store(
package_name: PACKAGE_NAME,
json_key: JSON_KEY,
metadata_path: METADATA,
track: ENV["PLAY_TRACK"] || "production",
skip_upload_apk: true,
skip_upload_aab: true,
# Feature graphic / icon are not managed here, only the localized
# screenshots prepared by scripts/prepare_store_screenshots.sh.
skip_upload_images: true,
skip_upload_screenshots: false,
# Release notes ("what's new") are handled per-release by the build
# workflow, so we don't overwrite them when syncing the listing.
skip_upload_changelogs: true,
changes_not_sent_for_review: true,
)
end
desc "Download the current Google Play listing into prop/store_metadata/android"
lane :download_metadata do
require "fileutils"
# `supply init` refuses to overwrite existing metadata (it just prints
# "Metadata already exists ..." and downloads nothing), so clear the folder
# first to re-pull the current live listing.
FileUtils.rm_rf(METADATA)
sh(
"bundle", "exec", "fastlane", "supply", "init",
"--json_key", JSON_KEY,
"--package_name", PACKAGE_NAME,
"--metadata_path", METADATA,
)
end
end