Sha256: d6c4e766bd2977b3aaa833db5fd45f4ef2be75f64e8ec063a26f42664ff3a9ec

Contents?: true

Size: 1.97 KB

Versions: 32

Compression:

Stored size: 1.97 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`](#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. Defaults to false",
                                       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

32 entries across 32 versions & 1 rubygems

Version Path
fastlane-2.82.0.beta.20180222010003 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.82.0.beta.20180221010003 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.82.0.beta.20180220010002 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.82.0.beta.20180219010003 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.82.0.beta.20180218010003 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.82.0.beta.20180217010002 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.82.0.beta.20180216010003 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.82.0.beta.20180215010002 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.82.0.beta.20180214010002 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.81.0 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.81.0.beta.20180213010002 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.81.0.beta.20180212010003 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.81.0.beta.20180211010003 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.81.0.beta.20180210010002 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.81.0.beta.20180209010002 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.81.0.beta.20180208010003 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.81.0.beta.20180207010002 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.81.0.beta.20180206010002 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.81.0.beta.20180205010003 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.81.0.beta.20180204010002 fastlane/lib/fastlane/actions/hg_push.rb