Move Map Libre API key to Xcode Cloud (#1313)
* Add config_production lane * Add maplibre to .gitignore * Add setupMapLibreKey * Add documentation * Fix failing UTs * Fix more UTs * Cleanup * Add secrets.xcconfig * Cleanup gitignore file * Update post-checkout hook * Cleanup SetupProject * Update project * Remove leftover in SetupProject * Cleanup project.yml * Add fastlane-plugin-xcconfig * Improve test * Update docs
This commit is contained in:
@@ -180,6 +180,9 @@ lane :config_nightly do
|
||||
data = YAML.load_file target_file_path
|
||||
data["settings"]["BASE_APP_GROUP_IDENTIFIER"] = "io.element.nightly"
|
||||
data["settings"]["BASE_BUNDLE_IDENTIFIER"] = "io.element.elementx.nightly"
|
||||
|
||||
config_maplibre()
|
||||
|
||||
File.open(target_file_path, 'w') { |f| YAML.dump(data, f) }
|
||||
|
||||
xcodegen(spec: "project.yml")
|
||||
@@ -193,6 +196,11 @@ lane :config_nightly do
|
||||
update_app_icon(caption_text: "Nightly #{release_version}", modulate: "100,20,100")
|
||||
end
|
||||
|
||||
lane :config_production do
|
||||
config_maplibre()
|
||||
xcodegen(spec: "project.yml")
|
||||
end
|
||||
|
||||
lane :upload_dsyms_to_sentry do |options|
|
||||
auth_token = ENV["SENTRY_AUTH_TOKEN"]
|
||||
UI.user_error!("Invalid Sentry Auth token.") unless !auth_token.to_s.empty?
|
||||
@@ -409,5 +417,15 @@ private_lane :create_simulator_if_necessary do |options|
|
||||
rescue
|
||||
sh("xcrun simctl create '#{simulator_name}' #{simulator_type}")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
private_lane :config_maplibre do
|
||||
api_key = ENV["MAPLIBRE_API_KEY"]
|
||||
UI.user_error!("Invalid Map Libre API key.") unless !api_key.to_s.empty?
|
||||
|
||||
set_xcconfig_value(
|
||||
path: './secrets.xcconfig',
|
||||
name: 'MAPLIBRE_API_KEY',
|
||||
value: api_key
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user