Class: Fastlane::Actions::ShorebirdPatchAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/shorebird/actions/shorebird_patch_action.rb

Class Method Summary collapse

Class Method Details

.authorsObject



15
16
17
# File 'lib/fastlane/plugin/shorebird/actions/shorebird_patch_action.rb', line 15

def self.authors
  Helper::ShorebirdHelper.authors
end

.available_optionsObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/fastlane/plugin/shorebird/actions/shorebird_patch_action.rb', line 23

def self.available_options
  [
    FastlaneCore::ConfigItem.new(
      key: :platform,
      description: "Which platform to patch (ios,android)",
      optional: false,
      type: String
    ),
    FastlaneCore::ConfigItem.new(
      key: :args,
      description: "The argument string to pass to shorebird release",
      optional: true,
      type: String,
      default_value: ""
    )
  ]
end

.descriptionObject



11
12
13
# File 'lib/fastlane/plugin/shorebird/actions/shorebird_patch_action.rb', line 11

def self.description
  "Create a Shorebird patch"
end

.detailsObject



19
20
21
# File 'lib/fastlane/plugin/shorebird/actions/shorebird_patch_action.rb', line 19

def self.details
  "Create a Shorebird patch for the provided platform with the given arguments."
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/fastlane/plugin/shorebird/actions/shorebird_patch_action.rb', line 41

def self.is_supported?(platform)
  Helper::ShorebirdHelper.supported_platforms.include?(platform)
end

.run(params) ⇒ Object



7
8
9
# File 'lib/fastlane/plugin/shorebird/actions/shorebird_patch_action.rb', line 7

def self.run(params)
  Fastlane::Actions.sh("shorebird patch #{params[:platform]} #{params[:args]}".strip)
end