Sha256: 9fc268ce2e2060a88eae4c832133f6959b10097944677f0912283ba486e8bd9b

Contents?: true

Size: 981 Bytes

Versions: 24

Compression:

Stored size: 981 Bytes

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
      require 'sigh/download_all'
      DownloadAll.new.download_all
    end

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

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

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
sigh-1.11.2 lib/sigh/manager.rb
sigh-1.11.1 lib/sigh/manager.rb
sigh-1.11.0 lib/sigh/manager.rb
sigh-1.10.4 lib/sigh/manager.rb
sigh-1.10.3 lib/sigh/manager.rb
sigh-1.10.2 lib/sigh/manager.rb
sigh-1.10.1 lib/sigh/manager.rb
sigh-1.10.0 lib/sigh/manager.rb
sigh-1.9.0 lib/sigh/manager.rb
sigh-1.8.0 lib/sigh/manager.rb
sigh-1.7.0 lib/sigh/manager.rb
sigh-1.6.1 lib/sigh/manager.rb
sigh-1.6.0 lib/sigh/manager.rb
sigh-1.5.0 lib/sigh/manager.rb
sigh-1.4.1 lib/sigh/manager.rb
sigh-1.4.0 lib/sigh/manager.rb
sigh-1.3.1 lib/sigh/manager.rb
sigh-1.3.0 lib/sigh/manager.rb
sigh-1.2.2 lib/sigh/manager.rb
sigh-1.2.1 lib/sigh/manager.rb