b0VIM 8.1Ò…Q_+Eìwñjoshjoshs-mbp.lan~josh/Projects/fastlane/fastlane/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb 3210#"! Utp]adª]ðßdž~}#õÚ¾”=0ó ç æ ¾ ½ § k  x  ï À † x P D : 9  Û Ñ Ð ¹ ¯ ] s   üûåÛtj`_I ùïËÁ·¶•‹DÜc,ïµ}$²{>Îr÷ÀƒJ@65ûúÓƼ´®ª©end end end end true def self.is_supported?(platform) end :source_control def self.category end ] is_string: false) default_value: false, optional: true, description: "The flag whether to ignore file the git status if the repo is dirty", env_name: "FL_ENSURE_GIT_STATUS_CLEAN_IGNORED_FILE", FastlaneCore::ConfigItem.new(key: :ignored, is_string: false), default_value: false, optional: true, description: "The flag whether to show the git diff if the repo is dirty", env_name: "FL_ENSURE_GIT_STATUS_CLEAN_SHOW_DIFF", FastlaneCore::ConfigItem.new(key: :show_diff, is_string: false), default_value: false, optional: true, description: "The flag whether to show uncommitted changes if the repo is dirty", env_name: "FL_ENSURE_GIT_STATUS_CLEAN_SHOW_UNCOMMITTED_CHANGES", FastlaneCore::ConfigItem.new(key: :show_uncommitted_changes, [ def self.available_options end ] 'ensure_git_status_clean' [ def self.example_code end ["lmirosevic", "antondomashnev"] def self.author end ] ['GIT_REPO_WAS_CLEAN_ON_START', 'Stores the fact that the git repo was clean at some point'] [ def self.output end ].join("\n") "Also needed as a prerequisite for some other actions like `reset_git_repo`." "Especially useful to put at the beginning of your Fastfile in the `before_all` block, if some of your other actions will touch your filesystem, do things to your git repo, or just as a general reminder to save your work.", "A sanity check to make sure you are working in a repo that is clean.", [ def self.details end "Raises an exception if there are uncommitted git changes" def self.description end end UI.user_error!(error_message) end error_message += "\nGit diff: \n#{repo_diff}" repo_diff = Actions.sh("git diff") if params[:show_diff] error_message += "\nUncommitted changes:\n#{repo_status}" if params[:show_uncommitted_changes] error_message = "Git repository is dirty! Please ensure the repo is in a clean state by committing/stashing/discarding all changes first." else Actions.lane_context[SharedValues::GIT_REPO_WAS_CLEAN_ON_START] = true UI.success('Git status is clean, all good! 💪') if repo_clean repo_clean = repo_status.empty? end repo_status = Actions.sh("git status --porcelain") else repo_status = Actions.sh("git status --porcelain --ignored #{ignored_file}") ignored_file = params[:ignored] if params[:ignored] def self.run(params) class EnsureGitStatusCleanAction < Action # Raises an exception and stop the lane execution if the repo is not in a clean state end GIT_REPO_WAS_CLEAN_ON_START = :GIT_REPO_WAS_CLEAN_ON_START module SharedValues module Actionsmodule Fastlane