35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
# File 'lib/fastlane/actions/badge.rb', line 35
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :dark,
env_name: "FL_BADGE_DARK",
description: "Adds a dark flavored badge ontop of your icon",
optional: true,
is_string: false,
verify_block: proc do |value|
raise "dark is only a flag and should always be true".red unless value == true
end),
FastlaneCore::ConfigItem.new(key: :custom,
env_name: "FL_BADGE_CUSTOM",
description: "Add your custom overlay/badge image",
optional: true,
verify_block: proc do |value|
raise "custom should be a valid file path".red unless value and File.exist?(value)
end),
FastlaneCore::ConfigItem.new(key: :no_badge,
env_name: "FL_BADGE_NO_BADGE",
description: "Hides the beta badge",
optional: true,
is_string: false,
verify_block: proc do |value|
raise "no_badge is only a flag and should always be true".red unless value == true
end),
FastlaneCore::ConfigItem.new(key: :shield,
env_name: "FL_BADGE_SHIELD",
description: "Add a shield to your app icon from shield.io",
optional: true,
is_string: true),
FastlaneCore::ConfigItem.new(key: :alpha,
env_name: "FL_BADGE_ALPHA",
description: "Adds and alpha badge instead of the default beta one",
optional: true,
is_string: false,
verify_block: proc do |value|
raise "alpha is only a flag and should always be true".red unless value == true
end),
FastlaneCore::ConfigItem.new(key: :path,
env_name: "FL_BADGE_PATH",
description: "Sets the root path to look for AppIcons",
optional: true,
is_string: true,
default_value: '.',
verify_block: proc do |value|
raise "path needs to be a valid directory".red if Dir[value].empty?
end),
FastlaneCore::ConfigItem.new(key: :shield_io_timeout,
env_name: "FL_BADGE_SHIELD_IO_TIMEOUT",
description: "Set custom duration for the timeout of the shield.io request in seconds",
optional: true,
is_string: false,
verify_block: proc do |value|
raise "shield_io_timeout needs to be an integer > 0".red if value.to_i < 1
end),
FastlaneCore::ConfigItem.new(key: :glob,
env_name: "FL_BADGE_GLOB",
description: "Glob pattern for finding image files",
optional: true,
is_string: true)
]
end
|