lib/ios/iosOption.rb in shellboxCLI-0.1.6 vs lib/ios/iosOption.rb in shellboxCLI-0.1.7

- old
+ new

@@ -1,31 +1,42 @@ require 'ios/module/setup/Template_Configurator' require 'thor' module App - - class IOS_CLI < Thor + + class IOS_CLI < Thor desc "module", "Create a new module to iOS platform" def module - IOS::TemplateConfigurator.new.run + IOS::TemplateConfigurator.new.run + end + + desc "install", "Install scripts and templates in project" + def install + puts "Verificando se existe Homebrew instalado" + brewExists = system('which -s brew') + if brewExists + puts "Atualizando Homebrew" + system('brew update') + else + puts "Instalando Homebrew" + system("/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"") end + puts "Instalando swiftgen" + system("brew install swiftgen") + + puts "✅ Instalado com sucesso" - desc "install", "Install scripts and templates in project" - def install - puts "Verificando se existe Homebrew instalado" - brewExists = system('which -s brew') - if brewExists - puts "Atualizando Homebrew" - system('brew update') - else - puts "Instalando Homebrew" - system("/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"") - end - puts "Instalando swiftgen" - system("brew install swiftgen") + install_hooks + end - puts "✅ Instalado com sucesso" - end + private + + def install_hooks + puts "Executando install_hooks..." + system('ruby hooks/install-hooks.rb') + puts "✅ Hooks instalados com sucesso" + end end +end -end \ No newline at end of file +end