bin/calabash-android-build.rb in calabash-android-0.3.0.pre9 vs bin/calabash-android-build.rb in calabash-android-0.3.0.pre10
- old
+ new
@@ -3,10 +3,11 @@
keystore = read_keystore_info()
test_server_file_name = test_server_path(app)
unsigned_test_apk = File.join(File.dirname(__FILE__), '..', 'lib/calabash-android/lib/TestServer.apk')
android_platform = Dir["#{ENV["ANDROID_HOME"].gsub("\\", "/")}/platforms/android-*"].last
+ raise "No Android SDK found in #{ENV["ANDROID_HOME"].gsub("\\", "/")}/platforms/" unless android_platform
Dir.mktmpdir do |workspace_dir|
Dir.chdir(workspace_dir) do
FileUtils.cp(unsigned_test_apk, "TestServer.apk")
FileUtils.cp(File.join(File.dirname(__FILE__), '..', 'test-server/AndroidManifest.xml'), "AndroidManifest.xml")
@@ -29,9 +30,10 @@
jarsigner_path = "jarsigner"
end
cmd = "#{jarsigner_path} -sigalg MD5withRSA -digestalg SHA1 -signedjar #{test_server_file_name} -storepass #{keystore["keystore_password"]} -keystore \"#{File.expand_path keystore["keystore_location"]}\" #{workspace_dir}/TestServer.apk #{keystore["keystore_alias"]}"
unless system(cmd)
+ puts "jarsigner command: #{cmd}"
raise "Could not sign test server"
end
end
puts "Done signing the test server. Moved it to #{test_server_file_name}"
end
\ No newline at end of file