Sha256: ddfb66f795de5a7245afe8c73faddc111a182ad3c932cccdac57367dab96c31f

Contents?: true

Size: 723 Bytes

Versions: 1

Compression:

Stored size: 723 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
qcloudhive-0.1.0 lib/qcloudhive/product.rb