Sha256: de24f7d4dab36f1b9fa9288eb2a50b5a362c8acd1af87c2463df4de91c3b3ace

Contents?: true

Size: 1.4 KB

Versions: 4

Compression:

Stored size: 1.4 KB

Contents

require 'ios_toolchain/helpers'

include IosToolchain::Helpers

namespace :ios do
  desc 'Builds the app'
  namespace :build do
    desc 'Builds the app with specified Configuration to output path'
    task :with, :output_path, :configuration do |t, args|
      args.with_defaults(:output_path => 'archive')

      puts '===================================='
      puts "=== Building #{args[:configuration]} archive in #{args[:output_path]}"
      puts '===================================='
      build_cmd = []
      build_cmd << "xcodebuild -project #{config.project_file_path}"
      build_cmd << "-scheme #{config.default_scheme} SYMROOT=build OBJROOT=build archive"
      build_cmd << "CODE_SIGNING_REQUIRED=YES -sdk #{config.default_sdk}"
      build_cmd << "-configuration #{args[:configuration]}" if args[:configuration]
      build_cmd << "-archivePath #{args[:output_path]}/#{config.default_scheme}.xcarchive"
      build_cmd << "-derivedDataPath derived"
      sh(build_cmd.join(' '))
    end

    desc 'Builds the app with Default configuration'
    task :default do
      Rake::Task['build:with'].invoke('archive', nil)
    end

    desc 'Builds the app with Acceptance configuration'
    task :acceptance do
      Rake::Task['build:with'].invoke('archive', 'Acceptance')
    end

    desc 'Builds the app with Beta configuration'
    task :beta do
      Rake::Task['build:with'].invoke('archive', 'Beta')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ios_toolchain-0.2.3 lib/ios_toolchain/tasks/ios/build.rake
ios_toolchain-0.2.2 lib/ios_toolchain/tasks/ios/build.rake
ios_toolchain-0.2.1 lib/ios_toolchain/tasks/ios/build.rake
ios_toolchain-0.2.0 lib/ios_toolchain/tasks/ios/build.rake