Remove sync_tool task from Rakefile when syncing [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2023-05-02 09:09:17 +09:00
parent b15e88e0fc
commit 31774bd565
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6
Notes: git 2023-05-02 11:59:52 +00:00

View File

@ -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