class Fastlane::Actions::UpdateProjectCodeSigningAction

Public Class Methods

author() click to toggle source
# File fastlane/lib/fastlane/actions/update_project_code_signing.rb, line 52
def self.author
  "KrauseFx"
end
available_options() click to toggle source
# File fastlane/lib/fastlane/actions/update_project_code_signing.rb, line 29
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :path,
                                 env_name: "FL_PROJECT_SIGNING_PROJECT_PATH",
                                 description: "Path to your Xcode project",
                                 verify_block: proc do |value|
                                   UI.user_error!("Path is invalid") unless File.exist?(value)
                                 end),
    FastlaneCore::ConfigItem.new(key: :udid,
                                 deprecated: "Use `:uuid` instead",
                                 env_name: "FL_PROJECT_SIGNING_UDID",
                                 code_gen_sensitive: true,
                                 default_value: ENV["SIGH_UUID"],
                                 default_value_dynamic: true),
    FastlaneCore::ConfigItem.new(key: :uuid,
                                 env_name: "FL_PROJECT_SIGNING_UUID",
                                 description: "The UUID of the provisioning profile you want to use",
                                 code_gen_sensitive: true,
                                 default_value: ENV["SIGH_UUID"],
                                 default_value_dynamic: true)
  ]
end
category() click to toggle source
# File fastlane/lib/fastlane/actions/update_project_code_signing.rb, line 64
def self.category
  :deprecated
end
deprecated_notes() click to toggle source
# File fastlane/lib/fastlane/actions/update_project_code_signing.rb, line 68
def self.deprecated_notes
  [
    "You shouldn't use `update_project_code_signing`.",
    "Have you considered using the recommended way to do code signing: [https://docs.fastlane.tools/codesigning/getting-started/](https://docs.fastlane.tools/codesigning/getting-started/)?"
  ].join("\n")
end
description() click to toggle source
# File fastlane/lib/fastlane/actions/update_project_code_signing.rb, line 25
def self.description
  "Updated code signing settings from 'Automatic' to a specific profile"
end
example_code() click to toggle source
# File fastlane/lib/fastlane/actions/update_project_code_signing.rb, line 60
def self.example_code
  nil
end
is_supported?(platform) click to toggle source
# File fastlane/lib/fastlane/actions/update_project_code_signing.rb, line 56
def self.is_supported?(platform)
  platform == :ios
end
run(params) click to toggle source
# File fastlane/lib/fastlane/actions/update_project_code_signing.rb, line 7
def self.run(params)
  UI.message("You shouldn't use update_project_code_signing")
  UI.message("Have you considered using the recommended way to do code signing?")
  UI.message("https://docs.fastlane.tools/codesigning/getting-started/")

  path = params[:path]
  path = File.join(path, "project.pbxproj")
  UI.user_error!("Could not find path to project config '#{path}'. Pass the path to your project (not workspace)!") unless File.exist?(path)

  uuid = params[:uuid] || params[:udid]
  UI.message("Updating provisioning profile UUID (#{uuid}) for the given project '#{path}'")

  p = File.read(path)
  File.write(path, p.gsub(/PROVISIONING_PROFILE = ".*";/, "PROVISIONING_PROFILE = \"#{uuid}\";"))

  UI.success("Successfully updated project settings to use UUID '#{uuid}'")
end