Sha256: 7e413425660b7cad91127a8037f3ff23632c79d6800b4e8208c9c15f1aa764f0

Contents?: true

Size: 973 Bytes

Versions: 2

Compression:

Stored size: 973 Bytes

Contents

require 'plist'
require 'sigh/spaceship/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

      output = File.join(Sigh.config[:output_path].gsub("~", ENV["HOME"]), file_name)
      (FileUtils.mv(path, output) rescue nil) # in case it already exists

      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)
      Helper.log.info "Installing provisioning profile..."

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sigh-0.10.6 lib/sigh/manager.rb
sigh-0.10.5 lib/sigh/manager.rb