Class: Fastlane::Actions::AddBadgeAction

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

Class Method Summary collapse

Class Method Details

.authorsObject



13
14
15
# File 'lib/fastlane/plugin/badge/actions/add_badge_action.rb', line 13

def self.authors
  ["HazAT"]
end

.available_optionsObject



30
31
32
# File 'lib/fastlane/plugin/badge/actions/add_badge_action.rb', line 30

def self.available_options
  Helper::BadgeHelper.available_options
end

.descriptionObject



9
10
11
# File 'lib/fastlane/plugin/badge/actions/add_badge_action.rb', line 9

def self.description
  "Automatically add a badge to your app icon"
end

.detailsObject



21
22
23
24
25
26
27
28
# File 'lib/fastlane/plugin/badge/actions/add_badge_action.rb', line 21

def self.details
  [
    "This action will add a light/dark badge onto your app icon.",
    "You can also provide your custom badge/overlay or add an shield for more customization more info:",
    "https://github.com/HazAT/badge",
    "**Note** If you want to reset the badge back to default you can use `sh 'git checkout -- <path>/Assets.xcassets/'`"
  ].join("\n")
end

.example_codeObject



34
35
36
37
38
39
40
41
# File 'lib/fastlane/plugin/badge/actions/add_badge_action.rb', line 34

def self.example_code
  [
    'add_badge(dark: true)',
    'add_badge(alpha: true)',
    'add_badge(custom: "/Users/xxx/Desktop/badge.png")',
    'add_badge(shield: "Version-0.0.3-blue", no_badge: true)'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/fastlane/plugin/badge/actions/add_badge_action.rb', line 43

def self.is_supported?(platform)
  [:ios, :mac, :android].include?(platform)
end

.return_valueObject



17
18
19
# File 'lib/fastlane/plugin/badge/actions/add_badge_action.rb', line 17

def self.return_value
  # If your method provides a return value, you can describe here what it does
end

.run(params) ⇒ Object



4
5
6
7
# File 'lib/fastlane/plugin/badge/actions/add_badge_action.rb', line 4

def self.run(params)
  Actions.verify_gem!('badge')
  Helper::BadgeHelper.run(params)
end