From 31774bd56506c49823c0b77a2ab025775e64ff26 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 2 May 2023 09:09:17 +0900 Subject: Remove `sync_tool` task from Rakefile when syncing [ci skip] --- tool/sync_test_lib.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tool') diff --git a/tool/sync_test_lib.rb b/tool/sync_test_lib.rb index 904fa42d02..23ca4a1154 100755 --- a/tool/sync_test_lib.rb +++ b/tool/sync_test_lib.rb @@ -76,6 +76,12 @@ repos.each do |repo| system "git add #{file}" end + rf = File.binread("Rakefile") + if rf.sub!(/(?>\A|(\n)\n*)task +:sync_tool +do\n(?>(?> .*)?\n)*end\n(?=\z|(\n))/) {$1&&$2} + File.binwrite("Rakefile", rf) + system "git add Rakefile" + end + if IO.popen(%W"git commit -m #{title}\n\n#{message}", &:read).chomp =~ /nothing to commit/ puts "#{repo}: nothing to update" elsif update -- cgit v1.2.1