X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0eb72b526bf8bbb011551ecf019f604e17a534f1..093ec98e4a065acfc537ea22c08c337c115fe273:/services/api/Rakefile diff --git a/services/api/Rakefile b/services/api/Rakefile index fad803cb94..70ceb653e6 100644 --- a/services/api/Rakefile +++ b/services/api/Rakefile @@ -7,6 +7,7 @@ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('../config/application', __FILE__) +require 'rake/testtask' Server::Application.load_tasks @@ -38,6 +39,7 @@ namespace :db do origfnm = File.expand_path('../db/structure.sql', __FILE__) tmpfnm = Tempfile.new 'structure.sql', File.expand_path('..', origfnm) copyright_done = false + started = false begin tmpfile = File.new tmpfnm, 'w' origfile = File.new origfnm @@ -48,8 +50,16 @@ namespace :db do end copyright_done = true end - if /^SET lock_timeout = 0;/ =~ line - # Avoid edit wars between versions that do/don't write this line. + + if !started && /^[^-\n]/ !~ line + # Ignore the "PostgreSQL database dump" comment block, + # which varies from one client version to the next. + next + end + started = true + + if /^SET (lock_timeout|idle_in_transaction_session_timeout|row_security) = / =~ line + # Avoid edit wars between versions that do/don't write (and can/can't execute) this line. next elsif /^COMMENT ON EXTENSION/ =~ line # Avoid warning message when loading: