[clean] Do not remove momd when no xcdatamodeld is available.

Related to http://hipbyte.myjetbrains.com/youtrack/issue/RM-649
This commit is contained in:
Eloy Durán
2014-10-31 14:08:46 +01:00
parent 858ff271c1
commit 1cbb6ea3bc
2 changed files with 3 additions and 0 deletions

2
NEWS
View File

@@ -1,5 +1,7 @@
= RubyMotion 2.38 =
* Fixed a bug where a compiled Core Data model would be removed when cleaning
when an original `xcdatamodeld' was not available.
* Fixed a bug where in certain circumstances cleaning would try to be
performed when the vendor dir, e.g. `vendor/Pods' did not exist.
* [OSX] Fixed a bug where embedded frameworks would not be codesigned as per

View File

@@ -299,6 +299,7 @@ EOS
paths.concat(Dir.glob(self.resources_dirs.flatten.map{ |x| x + '/**/*.{nib,storyboardc,momd}' }))
paths.each do |p|
next if File.extname(p) == ".nib" && !File.exist?(p.sub(/\.nib$/, ".xib"))
next if File.extname(p) == ".momd" && !File.exist?(p.sub(/\.momd$/, ".xcdatamodeld"))
App.info 'Delete', relative_path(p)
rm_rf p
if File.exist?(p)