Sha256: 152286aa4b804f7c7bbbf8fd960a1dd223cb8348fe780bf61c7ccbb3291dcdc5

Contents?: true

Size: 1.13 KB

Versions: 10

Compression:

Stored size: 1.13 KB

Contents

module Fastlane
  module Actions
    # Resigns the ipa
    class ResignAction
      def self.run(params)
        require 'sigh'

        params = params.first

        raise 'You must pass valid params to the resign action. Please check the README.md'.red if (params.nil? || params.empty?)

        ipa                   = params[:ipa] || Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]
        signing_identity      = params[:signing_identity]
        provisioning_profile  = params[:provisioning_profile] || Actions.lane_context[SharedValues::SIGH_PROFILE_PATH]

        raise 'Please pass a valid ipa which should be a path to an ipa on disk'.red unless ipa
        raise 'Please pass a valid signing_identity'.red unless signing_identity
        raise 'Please pass a valid provisioning_profile which should be a path to a profile on disk.'.red unless provisioning_profile

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fastlane-0.6.1 lib/fastlane/actions/resign.rb
fastlane-0.6.0 lib/fastlane/actions/resign.rb
fastlane-0.5.0 lib/fastlane/actions/resign.rb
fastlane-0.4.2 lib/fastlane/actions/resign.rb
fastlane-0.4.1 lib/fastlane/actions/resign.rb
fastlane-0.4.0 lib/fastlane/actions/resign.rb
fastlane-0.3.0 lib/fastlane/actions/resign.rb
fastlane-0.2.1 lib/fastlane/actions/resign.rb
fastlane-0.2.0 lib/fastlane/actions/resign.rb
fastlane-0.1.19 lib/fastlane/actions/resign.rb