From 552ab537e80e9fc6e5a374ff1b7f82e7101c1950 Mon Sep 17 00:00:00 2001 From: John-Philip Taylor <41227383+jpt13653903@users.noreply.github.com> Date: Fri, 19 Sep 2025 23:52:08 +0200 Subject: [PATCH] docs(cli): add docs on new `version` features --- docs/src/cli/version.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/src/cli/version.md b/docs/src/cli/version.md index 94ec6282..e8f7a840 100644 --- a/docs/src/cli/version.md +++ b/docs/src/cli/version.md @@ -17,12 +17,26 @@ This will update the version in several files, if they exist: * CMakeLists.txt * pyproject.toml +Alternative forms can use the version in `tree-sitter.json` to bump automatically: + +```bash +tree-sitter version --bump patch # patch bump +tree-sitter version --bump minor # minor bump +tree-sitter version --bump major # major bump +``` + As a grammar author, you should keep the version of your grammar in sync across different bindings. However, doing so manually is error-prone and tedious, so this command takes care of the burden. If you are using a version control system, it is recommended to commit the changes made by this command, and to tag the commit with the new version. +To print the current version without bumping it, use: + +```bash +tree-sitter version +``` + ## Options ### `-p/--grammar-path `