Sha256: 8ef6153080f46fb15739742d109567772c7ee6d7e35bec8c3e87d706293e54b8
Contents?: true
Size: 749 Bytes
Versions: 8
Compression:
Stored size: 749 Bytes
Contents
module Fastlane module Actions # Does a hard reset and clean on the repo class ResetGitRepoAction def self.run(params) if params.include?(:force) || Actions.lane_context[SharedValues::GIT_REPO_WAS_CLEAN_ON_START] Actions.sh('git reset --hard HEAD') Actions.sh('git clean -qfdx') Helper.log.info 'Git repo was reset and cleaned back to a pristine state.'.green else raise 'This is a destructive and potentially dangerous action. To protect from data loss, please add the `ensure_git_status_clean` action to the beginning of your lane, or if you\'re absolutely sure of what you\'re doing then call this action with the :force option.'.red end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems