only-bible-app v3.7.2+24

#kotlin#android#ios

git clone https://git.pyrossh.dev/only-bible-app

The only bible app you will ever need. No ads. No in-app purchases. No distractions.


macos/fastlane/Fastfile
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:mac)

# Screenshots are left untouched by default (regenerating/uploading them on
# every release is slow and usually a no-op since the UI rarely changes).
# Opt in with `fastlane release update_screenshots:true` or
# `UPDATE_SCREENSHOTS=true fastlane release`.
def update_screenshots_requested?(options)
  options[:update_screenshots] || %w[1 true].include?(ENV["UPDATE_SCREENSHOTS"])
end

platform :mac do
  desc "Get App Store Connect API key"
  lane :api_key do
    app_store_connect_api_key(
      key_id: "CB6LCVYFTC",
      issuer_id: "abc54778-7886-4294-8e5c-ef9f7bb0827d",
      key_filepath: "../certs/AuthKey_CB6LCVYFTC.p8",
      duration: 1200,
      in_house: false
    )
  end

  desc "Ensure signing certificates and provisioning profile exist"
  lane :certs do
    api_key = api_key()
    # App-signing cert (Apple Distribution) - must run before sigh so sigh
    # picks this cert's id, not the installer cert's.
    cert(platform: "macos", api_key: api_key, output_path: "../certs")
    sigh(platform: "macos", app_identifier: "sh.pyros.only-bible-app", api_key: api_key, output_path: "../certs")
    # Installer-signing cert, used to sign the .pkg wrapping the .app.
    cert(type: "mac_installer_distribution", platform: "macos", api_key: api_key, output_path: "../certs")
  end

  desc "Build and sign the macOS app and installer package"
  lane :build do
    certs
    # Regenerates Flutter-Generated.xcconfig so MARKETING_VERSION/CURRENT_PROJECT_VERSION
    # match pubspec.yaml - build_mac_app runs xcodebuild directly and won't do this itself.
    sh("cd ../.. && flutter build macos --config-only")
    build_mac_app(
      workspace: "Runner.xcworkspace",
      scheme: "Runner",
      configuration: "Release",
      export_method: "app-store",
      output_directory: "./build",
      output_name: "only-bible-app"
    )
  end

  desc "Regenerate Mac App Store screenshots from the Flutter golden tests"
  lane :screenshots do
    sh("cd ../.. && flutter test test/screenshot_test.dart --update-goldens")
  end

  desc "Push a new release build to the Mac App Store"
  lane :release do |options|
    update_screenshots = update_screenshots_requested?(options)
    screenshots if update_screenshots
    build
    api_key = api_key()
    upload_to_app_store(
      api_key: api_key,
      platform: "osx",
      pkg: lane_context[SharedValues::PKG_OUTPUT_PATH],
      skip_screenshots: !update_screenshots,
      overwrite_screenshots: update_screenshots,
      precheck_include_in_app_purchases: false
    )
  end

  desc "Upload a pre-built package to the Mac App Store"
  lane :upload do |options|
    update_screenshots = update_screenshots_requested?(options)
    api_key = api_key()
    deliver(
      api_key: api_key,
      platform: "osx",
      pkg: "./build/only-bible-app.pkg",
      automatic_release: true,
      submit_for_review: true,
      precheck_include_in_app_purchases: false,
      skip_screenshots: !update_screenshots,
      overwrite_screenshots: update_screenshots
    )
  end
end