Sha256: c5758aaf7c4b3f7b919a81e54a70f96147f1f4ff6b71c9baf20fd2299d22205a
Contents?: true
Size: 1.7 KB
Versions: 20
Compression:
Stored size: 1.7 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 pwd = FileUtils.pwd cmd = "#{pwd}/calabash/gitversioning-before.sh #{pwd}/calabash/LPGitVersionDefines.h" puts cmd `#{cmd}` puts 'Building Server' cmd = 'xcodebuild build -project calabash.xcodeproj -target Framework -configuration Debug -sdk iphonesimulator7.0' puts cmd puts `#{cmd}` cmd = "#{pwd}/calabash/gitversioning-after.sh #{pwd}/calabash/LPGitVersionDefines.h" puts cmd `#{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 :install_server => [:build_server] task :release_server => [:build_server]
Version data entries
20 entries across 20 versions & 1 rubygems