Class: Fastlane::Setup
- Inherits:
-
Object
- Object
- Fastlane::Setup
- Defined in:
- lib/fastlane/setup/setup.rb
Direct Known Subclasses
Instance Method Summary collapse
- #is_android? ⇒ Boolean
- #is_ios? ⇒ Boolean
-
#run ⇒ Object
Start the setup process.
- #show_analytics ⇒ Object
Instance Method Details
#is_android? ⇒ Boolean
31 32 33 |
# File 'lib/fastlane/setup/setup.rb', line 31 def is_android? Dir["*.gradle"].count > 0 end |
#is_ios? ⇒ Boolean
27 28 29 |
# File 'lib/fastlane/setup/setup.rb', line 27 def is_ios? (Dir["*.xcodeproj"] + Dir["*.xcworkspace"]).count > 0 end |
#run ⇒ Object
Start the setup process
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/fastlane/setup/setup.rb', line 4 def run platform = nil if is_ios? Helper.log.info "Detected iOS/Mac project in current directory..." platform = :ios elsif is_android? Helper.log.info "Detected Android project in current directory..." platform = :android else Helper.log.info "Couldn't automatically detect the platform" val = agree("Is this project an iOS project? (y/n) ".yellow, true) platform = (val ? :ios : :android) end if platform == :ios SetupIos.new.run elsif platform == :android SetupAndroid.new.run else raise "Couldn't find platform '#{platform}'" end end |
#show_analytics ⇒ Object
35 36 37 38 39 40 |
# File 'lib/fastlane/setup/setup.rb', line 35 def show_analytics Helper.log.info "fastlane will send the number of errors for each action to" Helper.log.info "https://github.com/fastlane/enhancer to detect integration issues" Helper.log.info "No sensitive/private information will be uploaded" Helper.log.info("You can disable this by adding `opt_out_usage` to your Fastfile") end |