Method: Fastlane::Actions::HgEnsureCleanStatusAction.run

Defined in:
fastlane/lib/fastlane/actions/hg_ensure_clean_status.rb

.run(params) ⇒ Object

[View source]

8
9
10
11
12
13
14
15
16
17
# File 'fastlane/lib/fastlane/actions/hg_ensure_clean_status.rb', line 8

def self.run(params)
  repo_clean = `hg status`.empty?

  if repo_clean
    UI.success('Mercurial status is clean, all good! 😎')
    Actions.lane_context[SharedValues::HG_REPO_WAS_CLEAN_ON_START] = true
  else
    UI.user_error!('Mercurial repository is dirty! Please ensure the repo is in a clean state by committing/stashing/discarding all changes first.')
  end
end