Sha256: 0e21764e9717bbdde7de6e3622ace06ec2aac39dbd818d741784f735f3c25c82

Contents?: true

Size: 1.43 KB

Versions: 23

Compression:

Stored size: 1.43 KB

Contents

require 'bundler'
require 'fileutils'

Bundler::GemHelper.install_tasks


task :build_server do

  FRAMEWORK='calabash.framework'
  ZIP_FILE="#{FRAMEWORK}.zip"

  def build_server
    return if ENV['SKIP_SERVER']
    framework_zip = nil
    dir = ENV['CALABASH_SERVER_PATH'] || File.join('..', '..', 'calabash-ios-server')
    unless File.exist?(dir)
      raise <<EOF
      Unable to find calabash server checked out at #{dir}.
      Please checkout as #{dir} or set CALABASH_SERVER_PATH to point
      to Calabash server (branch 0.9.x).
EOF
    end

    FileUtils.cd(dir) do
      puts 'Building Server'
      cmd = 'xcodebuild build -project calabash.xcodeproj -target Framework -configuration Debug -sdk iphonesimulator6.1'
      puts cmd
      puts `#{cmd}`

      unless File.exist?(FRAMEWORK)
        raise 'Unable to build framework'
      end

      puts "Zipping down framework"


      zip_cmd = "zip -q -r #{ZIP_FILE} #{FRAMEWORK}"
      puts zip_cmd
      puts `#{zip_cmd}`
      framework_zip = File.expand_path(ZIP_FILE)
      unless File.exist?(framework_zip)
        raise 'Unable to zip down framework...'
      end
    end



    FileUtils.mkdir_p('staticlib')
    output_path = File.join('staticlib', ZIP_FILE)
    FileUtils.mv(framework_zip,output_path, :force => true)
    puts "Server built to path #{output_path}"

  end

  build_server

end

task :build => [:build_server]
task :install => [:build_server]
task :release => [:build_server]

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
testautoi-0.9.147 Rakefile
testautoi-0.9.146 Rakefile
calabash-cucumber-0.9.151 Rakefile
testautoi-0.9.145 Rakefile
calabash-cucumber-0.9.150 Rakefile
calabash-cucumber-0.9.149 Rakefile
calabash-cucumber-0.9.148 Rakefile
calabash-cucumber-0.9.147 Rakefile
testautoi-0.9.144 Rakefile
calabash-cucumber-0.9.146 Rakefile
calabash-cucumber-0.9.145 Rakefile
calabash-cucumber-0.9.145.pre6 Rakefile
calabash-cucumber-0.9.145.pre5 Rakefile
calabash-cucumber-0.9.145.pre4 Rakefile
testautoi-0.9.143 Rakefile
calabash-cucumber-0.9.145.pre3 Rakefile
calabash-cucumber-0.9.145.pre2 Rakefile
calabash-cucumber-0.9.145.pre1 Rakefile
calabash-cucumber-0.9.144 Rakefile
testautoi-0.9.142 Rakefile