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.34.0 lib/fastlane/actions/hg_push.rb
fastlane-1.33.6 lib/fastlane/actions/hg_push.rb
fastlane-1.33.5 lib/fastlane/actions/hg_push.rb
fastlane-1.33.4 lib/fastlane/actions/hg_push.rb
fastlane-1.33.3 lib/fastlane/actions/hg_push.rb
fastlane-1.33.2 lib/fastlane/actions/hg_push.rb
fastlane-1.33.1 lib/fastlane/actions/hg_push.rb
fastlane-1.33.0 lib/fastlane/actions/hg_push.rb
fastlane-1.32.4 lib/fastlane/actions/hg_push.rb
fastlane-1.32.3 lib/fastlane/actions/hg_push.rb
fastlane-1.32.2 lib/fastlane/actions/hg_push.rb
fastlane-1.32.1 lib/fastlane/actions/hg_push.rb
fastlane-1.32.0 lib/fastlane/actions/hg_push.rb
fastlane-1.31.0 lib/fastlane/actions/hg_push.rb
fastlane-1.30.2 lib/fastlane/actions/hg_push.rb
fastlane-1.30.1 lib/fastlane/actions/hg_push.rb
fastlane-1.30.0 lib/fastlane/actions/hg_push.rb
fastlane-1.29.2 lib/fastlane/actions/hg_push.rb
fastlane-1.29.1 lib/fastlane/actions/hg_push.rb
fastlane-1.29.0 lib/fastlane/actions/hg_push.rb