X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/3a5a2df922d086cf1c40b827ef0808d87c79090e..35878846da952ebfe24f6d4ea801f4161d97463a:/cookbooks/web/definitions/rails_port.rb diff --git a/cookbooks/web/definitions/rails_port.rb b/cookbooks/web/definitions/rails_port.rb index 75d22d271..06a68504b 100644 --- a/cookbooks/web/definitions/rails_port.rb +++ b/cookbooks/web/definitions/rails_port.rb @@ -274,20 +274,21 @@ define :rails_port, :action => [:create, :enable] do cwd "#{rails_directory}/lib/quad_tile" user rails_user group rails_group - not_if { File.exist?("#{rails_directory}/lib/quad_tile/Makefile") && File.mtime("#{rails_directory}/lib/quad_tile/Makefile") >= File.mtime("#{rails_directory}/lib/quad_tile/extconf.rb") } + not_if do + File.exist?("#{rails_directory}/lib/quad_tile/quad_tile_so.so") && + File.mtime("#{rails_directory}/lib/quad_tile/quad_tile_so.so") >= File.mtime("#{rails_directory}/lib/quad_tile/extconf.rb") && + File.mtime("#{rails_directory}/lib/quad_tile/quad_tile_so.so") >= File.mtime("#{rails_directory}/lib/quad_tile/quad_tile.c") && + File.mtime("#{rails_directory}/lib/quad_tile/quad_tile_so.so") >= File.mtime("#{rails_directory}/lib/quad_tile/quad_tile.h") + end + notifies :run, "execute[#{rails_directory}/lib/quad_tile/Makefile]" end execute "#{rails_directory}/lib/quad_tile/Makefile" do + action :nothing command "make" cwd "#{rails_directory}/lib/quad_tile" user rails_user group rails_group - not_if do - File.exist?("#{rails_directory}/lib/quad_tile/quad_tile_so.so") && - File.mtime("#{rails_directory}/lib/quad_tile/quad_tile_so.so") >= File.mtime("#{rails_directory}/lib/quad_tile/Makefile") && - File.mtime("#{rails_directory}/lib/quad_tile/quad_tile_so.so") >= File.mtime("#{rails_directory}/lib/quad_tile/quad_tile.c") && - File.mtime("#{rails_directory}/lib/quad_tile/quad_tile_so.so") >= File.mtime("#{rails_directory}/lib/quad_tile/quad_tile.h") - end notifies :run, "execute[#{rails_directory}]" end