mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-27 00:01:05 +08:00
when running the simulator, clean the sandbox directory only if the clean environment variable is set to any value
This commit is contained in:
@@ -30,12 +30,14 @@ task :simulator => ['build:simulator'] do
|
|||||||
sdk_version = App.config.sdk_version
|
sdk_version = App.config.sdk_version
|
||||||
|
|
||||||
# Cleanup the simulator application sandbox, to avoid having old resource files there.
|
# Cleanup the simulator application sandbox, to avoid having old resource files there.
|
||||||
sim_apps = File.expand_path("~/Library/Application Support/iPhone Simulator/#{sdk_version}/Applications")
|
if ENV['clean']
|
||||||
Dir.glob("#{sim_apps}/**/*.app").each do |app_bundle|
|
sim_apps = File.expand_path("~/Library/Application Support/iPhone Simulator/#{sdk_version}/Applications")
|
||||||
if File.basename(app_bundle) == File.basename(app)
|
Dir.glob("#{sim_apps}/**/*.app").each do |app_bundle|
|
||||||
rm_rf File.dirname(app_bundle)
|
if File.basename(app_bundle) == File.basename(app)
|
||||||
break
|
rm_rf File.dirname(app_bundle)
|
||||||
end
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Launch the simulator.
|
# Launch the simulator.
|
||||||
|
|||||||
Reference in New Issue
Block a user