From 1cbb6ea3bc19a20c790c81b7a926f31d57f2febf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eloy=20Dur=C3=A1n?= Date: Fri, 31 Oct 2014 14:08:46 +0100 Subject: [PATCH] [clean] Do not remove `momd` when no `xcdatamodeld` is available. Related to http://hipbyte.myjetbrains.com/youtrack/issue/RM-649 --- NEWS | 2 ++ lib/motion/project/config.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index cf2efb65..8864a6e9 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/lib/motion/project/config.rb b/lib/motion/project/config.rb index 23efd12c..fb775d5f 100644 --- a/lib/motion/project/config.rb +++ b/lib/motion/project/config.rb @@ -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)