Sha256: d0cd514d8dcf555d1bbcb613f1a98dc9a965bb2ed4da9bace47aaf2677a92f5a

Contents?: true

Size: 1.95 KB

Versions: 77

Compression:

Stored size: 1.95 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",
                                       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

77 entries across 77 versions & 1 rubygems

Version Path
fastlane-2.94.0.beta.20180425050017 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.93.1 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.94.0.beta.20180424050050 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.93.0 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.93.0.beta.20180423050019 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.93.0.beta.20180422050034 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.93.0.beta.20180421050012 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.93.0.beta.20180420050021 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.93.0.beta.20180419050008 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.93.0.beta.20180418050020 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.92.1 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.93.0.beta.20180417050013 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.92.0 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.92.0.beta.20180416050023 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.92.0.beta.20180415050019 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.92.0.beta.20180414050023 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.91.0 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.91.0.beta.20180413050017 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.90.0 fastlane/lib/fastlane/actions/hg_push.rb
fastlane-2.90.0.beta.20180412050111 fastlane/lib/fastlane/actions/hg_push.rb