Class: Pod::Command::Mod::Template

Inherits:
Pod::Command::Mod show all
Defined in:
lib/cocoapods-modularization/command/mod/template.rb

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Template

Returns a new instance of Template.



14
15
16
# File 'lib/cocoapods-modularization/command/mod/template.rb', line 14

def initialize(argv)
  super
end

Instance Method Details

#runObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/cocoapods-modularization/command/mod/template.rb', line 22

def run
  build_path = "#{Dir.pwd}/build.sh"
  if File.exist?(build_path)
    FileUtils.rm_rf(build_path)
  end

  `git clone git@gitlab.appshahe.com:shared-specs/template.git .build`

  unless File.exist?("#{Dir.pwd}/.build")
    puts "./.build not found"
    return
  end

  FileUtils.mv("#{Dir.pwd}/.build/build.sh", "#{Dir.pwd}/build.sh")
  FileUtils.rm_rf("#{Dir.pwd}/.build")
end

#validate!Object



18
19
20
# File 'lib/cocoapods-modularization/command/mod/template.rb', line 18

def validate!
  super
end