require_relative "utils.rb" require_relative "config.rb" module QCloudHive def QCloudHive.CreateAPP(cmd, opts) name = opts[:c_name] if name == nil puts "ERROR! no name, please input one" puts cmd.help exit(1) end Rake::sh "#{Config.scriptesDirectory}HiveApp.sh #{name}" Rake::sh "cd #{name} \n" + "pod install \n" + "open #{name}.xcworkspace" url = opts[:c_url] if url == nil puts "您没有设置URL,将不会进行Git 远端仓库配置" else Rake::sh "cd #{name} \n" + ''' git init git add . git commit -m "init" ''' + "git remote add origin #{url} \n " + " git push -u origin master \n" end end end