Sha256: cd00ccf6e9d60f6cd064d67a7d53eedf2a6f99dcffe03bf669c30168075a8583

Contents?: true

Size: 1.45 KB

Versions: 69

Compression:

Stored size: 1.45 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.is_test?

        Actions.sh(command.join(' '))
        Helper.log.info 'Successfully pushed changes to remote 🚀.'.green
      end

      def self.description
        "This will push changes to the remote hg repository"
      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
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
fastlane-1.66.0 lib/fastlane/actions/hg_push.rb
fastlane-1.65.0 lib/fastlane/actions/hg_push.rb
fastlane-1.64.0 lib/fastlane/actions/hg_push.rb
fastlane-1.63.1 lib/fastlane/actions/hg_push.rb
fastlane-1.63.0 lib/fastlane/actions/hg_push.rb
fastlane-1.62.0 lib/fastlane/actions/hg_push.rb
fastlane-1.61.0 lib/fastlane/actions/hg_push.rb
fastlane-1.60.0 lib/fastlane/actions/hg_push.rb
fastlane-1.59.0 lib/fastlane/actions/hg_push.rb
fastlane-1.58.0 lib/fastlane/actions/hg_push.rb
fastlane-1.57.0 lib/fastlane/actions/hg_push.rb
fastlane-1.56.0 lib/fastlane/actions/hg_push.rb
fastlane-1.55.0 lib/fastlane/actions/hg_push.rb
fastlane-1.54.0 lib/fastlane/actions/hg_push.rb
fastlane-1.53.0 lib/fastlane/actions/hg_push.rb
fastlane-1.52.0 lib/fastlane/actions/hg_push.rb
fastlane-1.51.0 lib/fastlane/actions/hg_push.rb
fastlane-1.50.0 lib/fastlane/actions/hg_push.rb
fastlane-1.49.0 lib/fastlane/actions/hg_push.rb
fastlane-1.48.0 lib/fastlane/actions/hg_push.rb