default_platform(:ios)

# App-Store-Auslieferung über fastlane deliver. Die Screenshots erzeugt
# ../tool/screenshots_ios.sh (Demo-Login + integration_test) direkt in
# screenshots/de-DE/; deliver ordnet sie anhand der Pixelgröße iPhone 6,5″ bzw.
# iPad 13″ zu.
#
# Authentifizierung über einen App-Store-Connect-API-Key (JSON im fastlane-
# Format, siehe README.md). Pfad per APP_STORE_CONNECT_API_KEY setzen; die Datei
# selbst wird per .gitignore nicht eingecheckt.
platform :ios do
  desc "Nur Screenshots hochladen (ersetzt die vorhandenen, verändert keine Texte/Binaries)"
  lane :upload_screenshots do
    upload_to_app_store(
      api_key_path: ENV["APP_STORE_CONNECT_API_KEY"] || "fastlane/app-store-connect-api-key.json",
      skip_binary_upload: true,
      skip_metadata: true,
      skip_app_version_update: true,
      skip_screenshots: false,
      overwrite_screenshots: true,
      screenshots_path: "./fastlane/screenshots",
      precheck_include_in_app_purchases: false,
      run_precheck_before_submit: false,
      force: true, # kein HTML-Vorschau-Bestätigungsschritt
    )
  end
end
