class Podage::Packager

Public Instance Methods

build(configuration = "Debug") click to toggle source
# 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) click to toggle source
# 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

Private Instance Methods

load_podage_file() click to toggle source

Create Pods project

# File lib/podage/packager.rb, line 78
def load_podage_file

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

        eval File.read(PODAGE_FILE_NAME)
        
end