Sha256: 56915a8c1b96b34cb926181a65d1a6aaada9ea47336b4b4b1541ac1cc4697fe3

Contents?: true

Size: 1.15 KB

Versions: 116

Compression:

Stored size: 1.15 KB

Contents

require 'plist'
require 'sigh/runner'

module Sigh
  class Manager
    def self.start
      path = Sigh::Runner.new.run

      return nil unless path

      if Sigh.config[:filename]
        file_name = Sigh.config[:filename]
      else
        file_name = File.basename(path)
      end

      FileUtils.mkdir_p(Sigh.config[:output_path])
      output = File.join(File.expand_path(Sigh.config[:output_path]), file_name)
      begin
        FileUtils.mv(path, output)
      rescue
        # in case it already exists
      end

      install_profile(output) unless Sigh.config[:skip_install]

      puts output.green

      return File.expand_path(output)
    end

    def self.download_all(download_xcode_profiles: false)
      require 'sigh/download_all'
      DownloadAll.new.download_all(download_xcode_profiles: download_xcode_profiles)
    end

    def self.install_profile(profile)
      uuid = FastlaneCore::ProvisioningProfile.uuid(profile)
      name = FastlaneCore::ProvisioningProfile.name(profile)
      ENV["SIGH_UDID"] = ENV["SIGH_UUID"] = uuid if uuid
      ENV["SIGH_NAME"] = name if name

      FastlaneCore::ProvisioningProfile.install(profile)
    end
  end
end

Version data entries

116 entries across 116 versions & 1 rubygems

Version Path
fastlane-2.63.0.beta.20171021010003 sigh/lib/sigh/manager.rb
fastlane-2.63.0.beta.20171020010003 sigh/lib/sigh/manager.rb
fastlane-2.63.0.beta.20171019010003 sigh/lib/sigh/manager.rb
fastlane-2.63.0.beta.20171018010003 sigh/lib/sigh/manager.rb
fastlane-2.62.0 sigh/lib/sigh/manager.rb
fastlane-2.62.0.beta.20171017010003 sigh/lib/sigh/manager.rb
fastlane-2.62.0.beta.20171016010004 sigh/lib/sigh/manager.rb
fastlane-2.62.0.beta.20171015010003 sigh/lib/sigh/manager.rb
fastlane-2.62.0.beta.20171014010003 sigh/lib/sigh/manager.rb
fastlane-2.62.0.beta.20171011010003 sigh/lib/sigh/manager.rb
fastlane-2.62.0.beta.20171010010004 sigh/lib/sigh/manager.rb
fastlane-2.61.0 sigh/lib/sigh/manager.rb
fastlane-2.61.0.beta.20171009010003 sigh/lib/sigh/manager.rb
fastlane-2.61.0.beta.20171008010003 sigh/lib/sigh/manager.rb
fastlane-2.61.0.beta.20171007010004 sigh/lib/sigh/manager.rb
fastlane-2.61.0.beta.20171006010004 sigh/lib/sigh/manager.rb