Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use Rake alá Frank

  • Loading branch information...
commit 68a30d851ca885668fd1c9226c705c39aa428090 1 parent 0b19193
@krukow krukow authored
Showing with 40 additions and 0 deletions.
  1. +40 −0 Rakefile
View
40 Rakefile
@@ -0,0 +1,40 @@
+#From https://github.com/moredip/Frank
+#See LICENSE for licensing information
+
+def discover_latest_sdk_version
+ latest_iphone_sdk = `xcodebuild -showsdks | grep -o "iphoneos.*$"`.chomp
+ version_part = latest_iphone_sdk[/iphoneos(.*)/,1]
+ version_part
+end
+
+def build_dir
+ File.expand_path 'build'
+end
+
+def build_cmd(arch)
+ %Q[xcodebuild -scheme Framework -configuration Debug -sdk #{arch}#{discover_latest_sdk_version} BUILD_DIR=\"#{build_dir}\" GCC_PREPROCESSOR_DEFINITIONS="\\$(inherited) DEBUG=0" clean build]
+end
+
+desc "Build the arm library"
+task :build_lib do
+ sh build_cmd(:iphoneos)
+end
+
+task :copy_to_dist do
+ sh "cp #{build_dir}/Debug-iphoneos/libCalabash.a dist/"
+end
+
+desc "clean build artifacts"
+task :clean do
+ rm_rf 'dist'
+ rm_rf "#{build_dir}"
+end
+
+desc "create dist directory"
+task :prep_dist do
+ mkdir_p 'dist'
+ mkdir_p "#{build_dir}"
+end
+
+task :build => [:clean, :prep_dist, :build_lib, :copy_to_dist]
+task :default => :build
Please sign in to comment.
Something went wrong with that request. Please try again.