Class: Fastlane::Helper::ExportOptionsPlist
- Inherits:
-
Object
- Object
- Fastlane::Helper::ExportOptionsPlist
- Defined in:
- lib/fastlane/plugin/shorebird/helper/export_options_plist.rb
Class Method Summary collapse
-
.generate_export_options_plist(export_options, provisioning_profile_mapping = nil) ⇒ String
Generates an export options plist for use with Shorebird.
Class Method Details
.generate_export_options_plist(export_options, provisioning_profile_mapping = nil) ⇒ String
Generates an export options plist for use with Shorebird. In addition to handling data produced by match, it also updates the export options to ensure that the build number is not managed by Xcode and that the release method is set to app-store.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/fastlane/plugin/shorebird/helper/export_options_plist.rb', line 12 def self.(, provisioning_profile_mapping = nil) = {} if .kind_of?(Hash) = [:method] = "app-store" if provisioning_profile_mapping # If match has provided provisioning profiles, put them in the export options plist [:provisioningProfiles] = provisioning_profile_mapping [:signingStyle] = 'manual' end elsif .kind_of?(String) = File.() unless File.exist?() raise "export_options path #{} does not exist" end = Plist.parse_xml() end # If manageAppVersionAndBuildNumber is not false, Shorebird won't # work. If set to true (or not provided), Xcode will change the build # number *after* the release is created, causing the app to be # unpatchable. [:manageAppVersionAndBuildNumber] = false .compact! tmp_path = Dir.mktmpdir('shorebird') plist_path = File.join(tmp_path, "ExportOptions.plist") File.write(plist_path, .to_plist) plist_path end |