Sha256: 73d77b18b08e0538a8c7c12b3abf1ea71ded11750e6c113fbf8e796d1a15d7ca

Contents?: true

Size: 1.98 KB

Versions: 460

Compression:

Stored size: 1.98 KB

Contents

module Fastlane
  module Actions
    # Pushes commits to the remote hg repo
    class HgPushAction < Action
      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

      def self.description
        "This will push changes to the remote hg repository"
      end

      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

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :force,
                                       env_name: "FL_HG_PUSH_FORCE",
                                       description: "Force push to remote",
                                       is_string: false,
                                       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

      def self.author
        # credits to lmirosevic for original git version
        "sjrmanning"
      end

      def self.is_supported?(platform)
        true
      end

      def self.example_code
        [
          'hg_push',
          'hg_push(
            destination: "ssh://hg@repohost.com/owner/repo",
            force: true
          )'
        ]
      end

      def self.category
        :source_control
      end
    end
  end
end

Version data entries

460 entries across 460 versions & 2 rubygems

Version Path
fastlane-2.130.0.beta.20190828200015 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190827200051 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190826200016 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190825200030 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190824200021 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190823200017 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190822200101 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190821200034 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190820200024 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190819200109 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190818200034 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190817200018 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190816200015 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190815200057 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.130.0.beta.20190814200010 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.129.0 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.129.0.beta.20190813200016 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.129.0.beta.20190811200106 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.129.0.beta.20190810200059 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.129.0.beta.20190809200051 fastlane/lib/fastlane/actions/hg_push.rb