lib/upgrade.rb in dev_tasks-0.0.84 vs lib/upgrade.rb in dev_tasks-0.0.85
- old
+ new
@@ -23,10 +23,10 @@
newest_file_rake_dir=nil
Dir.chdir(rake_dir) do
newest_file_rake_dir=rake_dir + '/' + Dir.glob("**/*").max_by {|f| File.mtime(f)}
end
- if(newest_file_rake_dir.nil?)
+ if(newest_file_rake_dir.nil? || DEV_TASKS[:newest_artifact].nil?)
self.add "<%Environment.rake('#{rake_dir}','default')%>"
else
self.add "<%Environment.rake('#{rake_dir}','default')%>" if(File.mtime(newest_file_rake_dir) > File.mtime(DEV_TASKS[:newest_artifact]))
end
end
\ No newline at end of file