summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-05-02 09:09:17 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-05-02 18:27:10 +0900
commit31774bd56506c49823c0b77a2ab025775e64ff26 (patch)
tree8bd3959ce749a13bd9b93ca99ca620195e69d7a0 /tool
parentb15e88e0fcccb03b9cc5e4c1478ec9b10e26c961 (diff)
downloadruby-31774bd56506c49823c0b77a2ab025775e64ff26.tar.gz
Remove `sync_tool` task from Rakefile when syncing [ci skip]
Diffstat (limited to 'tool')
-rwxr-xr-xtool/sync_test_lib.rb6
1 files changed, 6 insertions, 0 deletions
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