b0VIM 8.1;-_hqjoshJoshs-Mac-mini.local~josh/Projects/fastlane/fastlane/sigh/lib/sigh/runner.rbutf-8 3210#"! UtpM\NE\Kad8MvuiZ=<Y n ;  s r V  n = # Q | r q   zMB  ]\:)cq>ayc @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DEVELOPMENT if Sigh.config[:development] @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_STORE when "catalyst" @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DIRECT if Sigh.config[:developer_id] @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DEVELOPMENT if Sigh.config[:development] @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_STORE when "macos" @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_DEVELOPMENT if Sigh.config[:development] @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_ADHOC if Sigh.config[:adhoc] @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_INHOUSE if Spaceship.client.in_house? @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_STORE when "tvos" @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_DEVELOPMENT if Sigh.config[:development] @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_ADHOC if Sigh.config[:adhoc] @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_INHOUSE if Spaceship.client.in_house? @profile_type = Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_STORE when "ios" case Sigh.config[:platform] return @profile_type if @profile_type def profile_type # The kind of provisioning profile we're interested in end return download_profile(profile) end ENV.delete("SIGH_PROFILE_ENTERPRISE") else ENV["SIGH_PROFILE_ENTERPRISE"] = "1" if [Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_INHOUSE, Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_INHOUSE].include?(profile_type) UI.user_error!("Something went wrong fetching the latest profile") unless profile end profile = create_profile! ensure_app_exists! UI.important("No existing profiles found, that match the certificates you have installed locally! Creating a new provisioning profile for you") UI.user_error!("No matching provisioning profile found and can not create a new one because you enabled `readonly`") if Sigh.config[:readonly] else end profile = create_profile! profile.delete! UI.important("Recreating the profile") # Recreating the profile ensures it has all of the requested properties (cert, name, etc.) if Sigh.config[:force] profile = profiles.first UI.success("Found #{profiles.count} matching profile(s)") if profiles.count > 0 profiles ||= fetch_profiles # download the profile if it's there profiles = [] if Sigh.config[:skip_fetch_profiles] UI.message("Successfully logged in") Spaceship.select_team Spaceship.login(Sigh.config[:username], nil) UI.message("Starting login with user '#{Sigh.config[:username]}'") title: "Summary for sigh #{Fastlane::VERSION}") hide_keys: [:output_path], FastlaneCore::PrintTable.print_values(config: Sigh.config, def run # returns the path the newly created provisioning profile (in /tmp usually) # Uses the spaceship to create or download a provisioning profile attr_accessor :spaceship class Runnermodule Sighrequire_relative 'module'require 'fastlane_core/cert_checker'require 'fastlane_core/print_table'require 'base64'require 'spaceship'ad( e=xO d  " ! end end end UI.message("") UI.message("==========================================".yellow) UI.message("If the app should also be created on App Store Connect, remove the " + "--skip_itc".yellow + " from the command above") UI.message("You will be asked for any missing information, like the full name of your app") UI.message("") UI.message("fastlane produce -u #{config[:username]} -a #{config[:app_identifier]} --skip_itc".yellow) UI.message("") UI.message("You can easily generate a new App ID on the Developer Portal using 'produce':") UI.message("Could not find App ID with bundle identifier '#{config[:app_identifier]}'") UI.message("==========================================".yellow) UI.message("") def print_produce_command(config) end UI.user_error!("Could not find App with App Identifier '#{Sigh.config[:app_identifier]}'") print_produce_command(Sigh.config) return if Spaceship::ConnectAPI::BundleId.find(Sigh.config[:app_identifier]) # always UNIVERSAL as of 2020-07-30 # We used to ensure by platform (IOS and MAC_OS) but now apps are # Only ensuring by app identifier def ensure_app_exists! # Makes sure the current App ID exists. If not, it will show an appropriate error message end return output_path