b0VIM 8.2A()aE#joshholtzJoshs-MacBook-Air.local~joshholtz/Developer/fastlane/fastlane/match/lib/match/storage/git_storage.rb 3210#"! Utp^[_Ead+^{E$iE b a @ '  X 1 G s P ' S wT7 e$vUKJ7a`g-SGF UI.message("Cloning remote git repo...") command = command_from_private_key(command) unless self.git_private_key.nil? end command += " -b #{self.branch.shellescape} --single-branch" elsif self.clone_branch_directly command << " --depth 1 --no-single-branch" if self.shallow_clone command << " -c http.extraheader='Authorization: Bearer #{self.git_bearer_authorization}'" unless self.git_bearer_authorization.nil? command << " -c http.extraheader='Authorization: Basic #{self.git_basic_authorization}'" unless self.git_basic_authorization.nil? # https://github.com/fastlane/fastlane/pull/15928 # Bitbucket requires `Authorization: Basic` and `Authorization Bearer` to work # HTTP headers are supposed to be be case insensitive but command = "git clone #{self.git_url.shellescape} #{self.working_directory.shellescape}" self.working_directory = Dir.mktmpdir # No existing working directory, creating a new one now return if @working_directory # Check if we already have a functional working_directory def download end return working_directory def prefixed_working_directory end self.platform = platform if platform self.type = type if type self.git_private_key = git_private_key self.git_bearer_authorization = git_bearer_authorization self.git_basic_authorization = git_basic_authorization self.clone_branch_directly = clone_branch_directly self.git_user_email = git_user_email self.git_full_name = git_full_name self.branch = branch self.skip_docs = skip_docs self.shallow_clone = shallow_clone self.git_url = git_url git_private_key: nil) git_bearer_authorization: nil, git_basic_authorization: nil, clone_branch_directly: false, git_user_email: nil, git_full_name: nil, branch: "master", skip_docs: false, shallow_clone: nil, git_url: nil, platform: nil, def initialize(type: nil, end ) git_private_key: params[:git_private_key] git_bearer_authorization: params[:git_bearer_authorization], git_basic_authorization: params[:git_basic_authorization], clone_branch_directly: params[:clone_branch_directly], git_user_email: params[:git_user_email], git_full_name: params[:git_full_name], branch: params[:git_branch], skip_docs: params[:skip_docs], shallow_clone: params[:shallow_clone], git_url: params[:git_url], platform: params[:platform].to_s, type: params[:type].to_s, return self.new( def self.configure(params) attr_accessor :git_private_key attr_accessor :git_bearer_authorization attr_accessor :git_basic_authorization attr_accessor :platform attr_accessor :type attr_accessor :clone_branch_directly attr_accessor :git_user_email attr_accessor :git_full_name attr_accessor :branch attr_accessor :skip_docs attr_accessor :shallow_clone attr_accessor :git_url # User provided values class GitStorage < Interface # Store the code signing identities in a git repo module Storagemodule Matchrequire_relative './interface'require_relative '../module'require 'fastlane_core/command_executor'adE>YX+ e  V U  @ { X B x w 8 EVe@?Zw4 end end end end UI.error(ex) UI.error("Couldn't commit or push changes back to git...") rescue => ex end end print_command: FastlaneCore::Globals.verbose?) print_all: FastlaneCore::Globals.verbose?, FastlaneCore::CommandExecutor.execute(command: command, commands.each do |command| Helper.with_env_values('GIT_TERMINAL_PROMPT' => '0') do UI.message("Pushing changes to remote git repo...") commands << git_push_command git_push_command = command_from_private_key(git_push_command) unless self.git_private_key.nil? git_push_command = "git push origin #{self.branch.shellescape}" commands << "git commit -m #{commit_message.shellescape}" commit_message ||= generate_commit_message def git_push(commands: [], commit_message: nil) end end end print_command: FastlaneCore::Globals.verbose?) print_all: FastlaneCore::Globals.verbose?, FastlaneCore::CommandExecutor.execute(command: command, commands.each do |command| Dir.chdir(self.working_directory) do UI.message("Add git user config to local git repo...") return if commands.empty? commands << "git config user.email \"#{user_email}\"" unless user_email.nil? commands << "git config user.name \"#{user_name}\"" unless user_name.nil? commands = [] # Add git config if needed def add_user_config(user_name, user_email) end return !result.empty? end print_command: FastlaneCore::Globals.verbose?) print_all: FastlaneCore::Globals.verbose?, FastlaneCore::CommandExecutor.execute(command: "git --no-pager branch --list origin/#{branch.shellescape} --no-color -r", result = Dir.chdir(self.working_directory) do return unless self.working_directory def branch_exists?(branch) # Checks if a specific branch exists in the git repo end end end print_command: FastlaneCore::Globals.verbose?) print_all: FastlaneCore::Globals.verbose?, FastlaneCore::CommandExecutor.execute(command: command, commands.each do |command| Dir.chdir(self.working_directory) do UI.message("Checking out branch #{self.branch}...") end commands << "git reset --hard" # We also need to reset the working directory to not transfer any uncommitted changes to the new branch. commands << "git checkout --orphan #{self.branch.shellescape}" # If a new branch is being created, we create it as an 'orphan' to not inherit changes from the master branch.