class Fastlane::Actions::HgPushAction

Pushes commits to the remote hg repo

Public Class Methods

author() click to toggle source
# File fastlane/lib/fastlane/actions/hg_push.rb, line 40
def self.author
  # credits to lmirosevic for original git version
  "sjrmanning"
end
available_options() click to toggle source
# File fastlane/lib/fastlane/actions/hg_push.rb, line 25
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :force,
                                 env_name: "FL_HG_PUSH_FORCE",
                                 description: "Force push to remote",
                                 type: Boolean,
                                 default_value: false),
    FastlaneCore::ConfigItem.new(key: :destination,
                                 env_name: "FL_HG_PUSH_DESTINATION",
                                 description: "The destination to push to",
                                 default_value: '',
                                 optional: true)
  ]
end
category() click to toggle source
# File fastlane/lib/fastlane/actions/hg_push.rb, line 59
def self.category
  :source_control
end
description() click to toggle source
# File fastlane/lib/fastlane/actions/hg_push.rb, line 17
def self.description
  "This will push changes to the remote hg repository"
end
details() click to toggle source
# File fastlane/lib/fastlane/actions/hg_push.rb, line 21
def self.details
  "The mercurial equivalent of [push_to_git_remote](https://docs.fastlane.tools/actions/push_to_git_remote/). Pushes your local commits to a remote mercurial repo. Useful when local changes such as adding a version bump commit or adding a tag are part of your lane’s actions."
end
example_code() click to toggle source
# File fastlane/lib/fastlane/actions/hg_push.rb, line 49
def self.example_code
  [
    'hg_push',
    'hg_push(
      destination: "ssh://hg@repohost.com/owner/repo",
      force: true
    )'
  ]
end
is_supported?(platform) click to toggle source
# File fastlane/lib/fastlane/actions/hg_push.rb, line 45
def self.is_supported?(platform)
  true
end
run(params) click to toggle source
# File fastlane/lib/fastlane/actions/hg_push.rb, line 5
def self.run(params)
  command = ['hg', 'push']

  command << '--force' if params[:force]
  command << params[:destination] unless params[:destination].empty?

  return command.join(' ') if Helper.test?

  Actions.sh(command.join(' '))
  UI.success('Successfully pushed changes to remote 🚀.')
end