Sha256: 29be23621fec30fc80bbf65ab0d96da04b0d9e13b53096e75b1447ce4c0896b2

Contents?: true

Size: 785 Bytes

Versions: 1

Compression:

Stored size: 785 Bytes

Contents

module Xcake
  class Command
    class Make < Command
      self.summary = 'Makes the Xcode project from a Cakefile'
      self.description = 'Makes the Xcode project from a Cakefile'

      def run
        file_path = "#{Dir.pwd}/Cakefile"

        unless File.exist?(file_path)
          raise Xcake::Informative, "Couldn't find Cakefile"
        end

        puts 'Reading Cakefile...'
        file_contents = File.read(file_path)

        project = Project.new
        project.instance_eval(file_contents, file_path)

        context = XcodeprojContext.new

        dependency_provider = DependencyProvider.new(Generator)
        dependency_provider.tsort.each do |g|
          generator = g.new(context)
          project.accept(generator)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xcake-0.6.20 lib/xcake/command/make.rb