Class: Afinstaller::Installers::IOSBuild
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Afinstaller::Installers::IOSBuild
- Includes:
- Thor::Actions
- Defined in:
- lib/afinstaller/installers/iOS/iosBuild.rb
Class Method Summary collapse
Instance Method Summary collapse
- #build_attmept ⇒ Object
- #clone_command ⇒ Object
- #open_project_folder ⇒ Object
- #pod_install_command ⇒ Object
Class Method Details
.source_root ⇒ Object
7 8 9 |
# File 'lib/afinstaller/installers/iOS/iosBuild.rb', line 7 def self.source_root File.dirname(__FILE__) end |
Instance Method Details
#build_attmept ⇒ Object
34 35 36 37 38 |
# File 'lib/afinstaller/installers/iOS/iosBuild.rb', line 34 def build_attmept puts Rainbow("== Attempting to build project ==").cyan system! 'xcodebuild -scheme GenericAF4 -workspace GenericAF4.xcworkspace/ -sdk iphonesimulator build | xcpretty' puts Rainbow("== Project built successfully ==").magenta end |
#clone_command ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/afinstaller/installers/iOS/iosBuild.rb', line 11 def clone_command v = "#{version}" FileUtils::mkdir "AF#{version}-iOS" unless File.exists?("AF#{version}-iOS") FileUtils.cd("AF#{version}-iOS", :verbose => false) puts Rainbow("== Cloning Repo ==").cyan system! 'git clone -b release/v'+v+' ssh://[email protected]:7999/af/af-template-ios.git' unless File.exist?('af-template-ios') puts Rainbow("== Cloning Succeeded ==").magenta end |
#open_project_folder ⇒ Object
40 41 42 43 44 |
# File 'lib/afinstaller/installers/iOS/iosBuild.rb', line 40 def open_project_folder puts Rainbow("== Open project folder ==").cyan system! 'open .' puts Rainbow("== AF Installer process completed. Thank you ==").magenta end |
#pod_install_command ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/afinstaller/installers/iOS/iosBuild.rb', line 20 def pod_install_command puts Rainbow("== Moving to project folder ==").cyan FileUtils.cd('af-template-ios', :verbose => false) puts Rainbow("== Folder is now af-template-ios ==").magenta puts Rainbow("== Attempting to run pod install ==").cyan system! 'pod install' puts Rainbow("== Cocoapod installation completed ==").magenta rescue NoMethodError => e puts Rainbow("== Something went wrong. Please try again. ==").red exit 1 end |