X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3ef580c47029ff0fbf959b044f29c183f41cb609..0eb72b526bf8bbb011551ecf019f604e17a534f1:/services/api/Rakefile diff --git a/services/api/Rakefile b/services/api/Rakefile index 67e4202ba2..fad803cb94 100644 --- a/services/api/Rakefile +++ b/services/api/Rakefile @@ -1,4 +1,8 @@ #!/usr/bin/env rake +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. @@ -33,10 +37,17 @@ namespace :db do require 'tempfile' origfnm = File.expand_path('../db/structure.sql', __FILE__) tmpfnm = Tempfile.new 'structure.sql', File.expand_path('..', origfnm) + copyright_done = false begin tmpfile = File.new tmpfnm, 'w' origfile = File.new origfnm origfile.each_line do |line| + if !copyright_done + if !/Copyright .* Arvados/.match(line) + tmpfile.write "-- Copyright (C) The Arvados Authors. All rights reserved.\n--\n-- SPDX-License-Identifier: AGPL-3.0\n\n" + end + copyright_done = true + end if /^SET lock_timeout = 0;/ =~ line # Avoid edit wars between versions that do/don't write this line. next