-
Notifications
You must be signed in to change notification settings - Fork 5.6k
/
build_mac_app.rb
46 lines (38 loc) 路 1.2 KB
/
build_mac_app.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
module Fastlane
module Actions
require 'fastlane/actions/build_app'
class BuildMacAppAction < BuildAppAction
# Gym::Options.available_options keys that don't apply to mac apps.
REJECT_OPTIONS = [
:ipa,
:skip_package_ipa,
:catalyst_platform
]
def self.run(params)
# Adding reject options back in so gym has everything it needs
params.available_options += Gym::Options.available_options.select do |option|
REJECT_OPTIONS.include?(option.key)
end
# Defaulting to mac specific values
params[:catalyst_platform] = "macos"
super(params)
end
#####################################################
# @!group Documentation
#####################################################
def self.available_options
require 'gym'
require 'gym/options'
Gym::Options.available_options.reject do |option|
REJECT_OPTIONS.include?(option.key)
end
end
def self.is_supported?(platform)
[:mac].include?(platform)
end
def self.description
"Alias for the `build_app` action but only for macOS"
end
end
end
end