rake: clear stale nightly tags for tree-sitter too
Assisted-by: Claude Opus 5.5 via Claude Code
change ozyvvnukmltwzwqxoovwtrzzsymmnytv
commit b8021de12dd23acfc66fe5a85e67745439b242ff
author Alpha Chen <alpha@kejadlen.dev>
date
parent yulokymr
diff --git a/Rakefile b/Rakefile
index fdd3e60e..1b5b725b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -259,10 +259,14 @@ end
 
 desc "Upgrade neovim"
 task :upgrade_neovim do
-  chdir File.expand_path("~/Library/Caches/Homebrew/neovim--git") do
-    sh "git tag --delete nightly stable" do
-      # no-op so that `sh` doesn't throw an
-      # exception if a tag doesn't exist
+  # fetch.prunetags fetches tags despite brew's --no-tags, so the moving
+  # nightly/stable tags would otherwise be rejected as clobbers.
+  %w[tree-sitter neovim].each do |formula|
+    chdir File.expand_path("~/Library/Caches/Homebrew/#{formula}--git") do
+      sh "git tag --delete nightly stable" do
+        # no-op so that `sh` doesn't throw an
+        # exception if a tag doesn't exist
+      end
     end
   end
   sh "brew upgrade tree-sitter --fetch-HEAD"