mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-01-06 07:44:27 +01:00
98 lines
2.3 KiB
Ruby
98 lines
2.3 KiB
Ruby
# 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(:ios)
|
|
|
|
ISSUER_ID = ENV["APPLE_ISSUER_ID"]
|
|
KEY_ID = ENV["APPLE_KEY_ID"]
|
|
KEY_CONTENT = ENV["APPLE_KEY_CONTENT"]
|
|
|
|
KEYCHAIN_NAME = ENV["KEYCHAIN_NAME"]
|
|
KEYCHAIN_PASSWORD = ENV["KEYCHAIN_PASSWORD"]
|
|
|
|
def delete_temp_keychain(name)
|
|
delete_keychain(
|
|
name: name
|
|
) if File.exist? File.expand_path("~/Library/Keychains/#{name}-db")
|
|
end
|
|
|
|
def create_temp_keychain(name, password)
|
|
create_keychain(
|
|
name: name,
|
|
password: password,
|
|
unlock: false,
|
|
timeout: 0
|
|
)
|
|
end
|
|
|
|
def ensure_temp_keychain(name, password)
|
|
delete_temp_keychain(name)
|
|
create_temp_keychain(name, password)
|
|
end
|
|
|
|
platform :ios do
|
|
desc "Push a new beta build to TestFlight"
|
|
lane :beta do
|
|
api_key = app_store_connect_api_key(
|
|
key_id: KEY_ID,
|
|
issuer_id: ISSUER_ID,
|
|
key_content: KEY_CONTENT
|
|
)
|
|
|
|
# In CI we don't want to be prompted for a password
|
|
ensure_temp_keychain(KEYCHAIN_NAME, KEYCHAIN_PASSWORD)
|
|
|
|
match(
|
|
type: "appstore",
|
|
keychain_name: KEYCHAIN_NAME,
|
|
keychain_password: KEYCHAIN_PASSWORD,
|
|
readonly: is_ci
|
|
)
|
|
|
|
increment_build_number(xcodeproj: "App.xcodeproj")
|
|
build_app(
|
|
workspace: "App.xcworkspace",
|
|
scheme: "App",
|
|
xcargs: "-allowProvisioningUpdates"
|
|
)
|
|
upload_to_testflight(api_key: api_key, skip_waiting_for_build_processing: true)
|
|
end
|
|
|
|
lane :build do
|
|
api_key = app_store_connect_api_key(
|
|
key_id: KEY_ID,
|
|
issuer_id: ISSUER_ID,
|
|
key_content: KEY_CONTENT
|
|
)
|
|
|
|
# In CI we don't want to be prompted for a password
|
|
ensure_temp_keychain(KEYCHAIN_NAME, KEYCHAIN_PASSWORD)
|
|
|
|
match(
|
|
type: "appstore",
|
|
keychain_name: KEYCHAIN_NAME,
|
|
keychain_password: KEYCHAIN_PASSWORD,
|
|
readonly: is_ci
|
|
)
|
|
|
|
increment_build_number(xcodeproj: "App.xcodeproj")
|
|
build_app(
|
|
workspace: "App.xcworkspace",
|
|
scheme: "App",
|
|
xcargs: "-allowProvisioningUpdates"
|
|
)
|
|
end
|
|
end
|