Class: Fastlane::Actions::UpdateProjectCodeSigningAction
- Inherits:
-
Fastlane::Action
- Object
- Fastlane::Action
- Fastlane::Actions::UpdateProjectCodeSigningAction
- Defined in:
- lib/fastlane/actions/update_project_code_signing.rb
Class Method Summary collapse
- .author ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Methods inherited from Fastlane::Action
Class Method Details
.author ⇒ Object
46 47 48 |
# File 'lib/fastlane/actions/update_project_code_signing.rb', line 46 def self. "KrauseFx" end |
.available_options ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/fastlane/actions/update_project_code_signing.rb', line 28 def self. [ FastlaneCore::ConfigItem.new(key: :path, env_name: "FL_PROJECT_SIGNING_PROJECT_PATH", description: "Path to your Xcode project", verify_block: Proc.new do |value| raise "Path is invalid".red unless File.exists?(value) end), FastlaneCore::ConfigItem.new(key: :udid, env_name: "FL_PROJECT_SIGNING_UDID", description: "The UDID of the provisioning profile you want to use", default_value: ENV["SIGH_UDID"], verify_block: Proc.new do |value| raise "Path is invalid".red unless File.exists?(value) end) ] end |
.description ⇒ Object
20 21 22 |
# File 'lib/fastlane/actions/update_project_code_signing.rb', line 20 def self.description "Updated code signing settings from 'Automatic' to a specific profile" end |
.details ⇒ Object
24 25 26 |
# File 'lib/fastlane/actions/update_project_code_signing.rb', line 24 def self.details "This feature is not yet 100% finished" end |
.is_supported?(platform) ⇒ Boolean
50 51 52 |
# File 'lib/fastlane/actions/update_project_code_signing.rb', line 50 def self.is_supported?(platform) platform == :ios end |
.run(params) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/fastlane/actions/update_project_code_signing.rb', line 7 def self.run(params) path = params[:path] path = File.join(path, "project.pbxproj") raise "Could not find path to project config '#{path}'. Pass the path to your project (not workspace)!".red unless File.exists?(path) Helper.log.info("Updating provisioning profile UDID (#{params[:udid]}) for the given project '#{path}'") p = File.read(path) File.write(path, p.gsub(/PROVISIONING_PROFILE = ".*";/, "PROVISIONING_PROFILE = \"#{params[:udid]}\";")) Helper.log.info("Successfully updated project settings to use UDID '#{params[:udid]}'".green) end |