Sha256: 8c847898a76862dd4ec9dfeda2400c6b00793cb9c0df2d213f24415ba7f80a12

Contents?: true

Size: 990 Bytes

Versions: 69

Compression:

Stored size: 990 Bytes

Contents

module Fastlane
  module Actions
    class ClipboardAction < Action
      def self.run(params)
        Helper.log.info "Storing '#{params[:value]}' in the clipboard 🎨"

        `echo "#{params[:value]}" | tr -d '\n' | pbcopy` # we don't use `sh`, as the command looks ugly
      end

      #####################################################
      # @!group Documentation
      #####################################################

      def self.description
        "Copies a given string into the clipboard. Works only on Mac OS X computers"
      end

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :value,
                                       env_name: "FL_CLIPBOARD_VALUE",
                                       description: "The string that should be copied into the clipboard")
        ]
      end

      def self.authors
        ["KrauseFx"]
      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/clipboard.rb
fastlane-1.65.0 lib/fastlane/actions/clipboard.rb
fastlane-1.64.0 lib/fastlane/actions/clipboard.rb
fastlane-1.63.1 lib/fastlane/actions/clipboard.rb
fastlane-1.63.0 lib/fastlane/actions/clipboard.rb
fastlane-1.62.0 lib/fastlane/actions/clipboard.rb
fastlane-1.61.0 lib/fastlane/actions/clipboard.rb
fastlane-1.60.0 lib/fastlane/actions/clipboard.rb
fastlane-1.59.0 lib/fastlane/actions/clipboard.rb
fastlane-1.58.0 lib/fastlane/actions/clipboard.rb
fastlane-1.57.0 lib/fastlane/actions/clipboard.rb
fastlane-1.56.0 lib/fastlane/actions/clipboard.rb
fastlane-1.55.0 lib/fastlane/actions/clipboard.rb
fastlane-1.54.0 lib/fastlane/actions/clipboard.rb
fastlane-1.53.0 lib/fastlane/actions/clipboard.rb
fastlane-1.52.0 lib/fastlane/actions/clipboard.rb
fastlane-1.51.0 lib/fastlane/actions/clipboard.rb
fastlane-1.50.0 lib/fastlane/actions/clipboard.rb
fastlane-1.49.0 lib/fastlane/actions/clipboard.rb
fastlane-1.48.0 lib/fastlane/actions/clipboard.rb