Class: Fastlane::Actions::ResignAction

Inherits:
Fastlane::Action show all
Defined in:
lib/fastlane/actions/resign.rb

Overview

Resigns the ipa

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, authors, details, output, sh, step_text

Class Method Details

.authorObject


43
44
45
# File 'lib/fastlane/actions/resign.rb', line 43

def self.author
  "lmirosevic"
end

.available_optionsObject


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/fastlane/actions/resign.rb', line 21

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :ipa,
                                 env_name: "FL_RESIGN_IPA",
                                 description: "Path to the ipa file to resign. Optional if you use the `ipa` or `xcodebuild` action",
                                 default_value: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
                                 verify_block: Proc.new do |value|
                                  raise "Couldn't find ipa file at path '#{value}'".red unless File.exists?(value)
                                 end),
    FastlaneCore::ConfigItem.new(key: :signing_identity,
                                 env_name: "FL_RESIGN_SIGNING_IDENTITY",
                                 description: "Code signing identity to use. e.g. \"iPhone Distribution: Luka Mirosevic (0123456789)\""),
    FastlaneCore::ConfigItem.new(key: :provisioning_profile,
                                 env_name: "FL_RESIGN_PROVISIONING_PROFILE",
                                 description: "Path to your provisioning_profile. Optional if you use `sigh`",
                                 default_value: Actions.lane_context[SharedValues::SIGH_PROFILE_PATH],
                                 verify_block: Proc.new do |value|
                                  raise "No provisioning_profile file given or found, pass using `provisioning_profile: 'path/app.mobileprovision'`".red unless File.exists?(value)
                                 end)
  ]
end

.descriptionObject


17
18
19
# File 'lib/fastlane/actions/resign.rb', line 17

def self.description
  "Codesign an existing ipa file"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)

47
48
49
# File 'lib/fastlane/actions/resign.rb', line 47

def self.is_supported?(platform)
  platform == :ios
end

.run(params) ⇒ Object


5
6
7
8
9
10
11
12
13
14
15
# File 'lib/fastlane/actions/resign.rb', line 5

def self.run(params)
  require 'sigh'


  # try to resign the ipa
  if Sigh::Resign.resign(params[:ipa], params[:signing_identity], params[:provisioning_profile])
    Helper.log.info 'Successfully re-signed .ipa 🔏.'.green
  else
    raise 'Failed to re-sign .ipa'.red
  end
end