Class: Podage::Packager

Inherits:
Object
  • Object
show all
Defined in:
lib/podage/packager.rb

Instance Method Summary collapse

Instance Method Details

#build(configuration = "Debug") ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/podage/packager.rb', line 34

def build(configuration = "Debug")

	if !File.file?('Podagefile')
		puts "No Podagefile found!".red
		exit
	end

	# Clean _build folder

	FileUtils.rm_rf BUILD_PATH
	FileUtils.rm_rf OUTPUT_PATH

	# Download Template

	puts "Preparing build environment".green
	`git clone #{TEMPLATE_REPO} _build`

	puts "Loading Podagefile".green
	load_podage_file

	#FileUtils.rm_rf BUILD_PATH

end

#package(platform, version, configuration = "Debug", &block) ⇒ Object



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/podage/packager.rb', line 58

def package(platform, version, configuration = "Debug", &block)

	if platform == :ios
	
		builder = Podage::IOSBuilder.new version
		builder.build(configuration, &block)
	
	elsif platform == :osx
	
		builder = Podage::OSXBuilder.new version
		builder.build(configuration, &block)
	
	end

end