bin/calabash-android-build.rb in calabash-android-0.0.5 vs bin/calabash-android-build.rb in calabash-android-0.0.6

- old
+ new

@@ -7,13 +7,14 @@ Dir.mktmpdir do |workspace_dir| @test_server_dir = File.join(workspace_dir, 'test-server') FileUtils.cp_r(test_server_template_dir, workspace_dir) + ant_executable = (is_windows? ? "ant.bat" : "ant") Dir.chdir(@test_server_dir) { args = [ - "ant", + ant_executable, "clean", "package", "-Dtested.package_name=#{@settings["package_name"]}", "-Dtested.main_activity=#{@settings["activity_name"]}", "-Dtested.project.apk=#{@settings["app_path"]}", @@ -31,9 +32,13 @@ exit $?.exitstatus end } test_apk = File.join(@test_server_dir, "bin", "Test.apk") - FileUtils.cp(test_apk, @support_dir) + FileUtils.cp(test_apk, File.join(@support_dir, "Test.apk")) puts "Done building the test server. Moved it to features/support/Test.apk" end end + +def is_windows? + ENV["OS"] == "Windows_NT" +end \ No newline at end of file