|
61 | 61 | Release |
62 | 62 | ------- |
63 | 63 |
|
64 | | -Steps to perform a release: |
| 64 | +Steps to perform a release: https://tree-sitter.github.io/tree-sitter/creating-parsers/6-publishing.html |
65 | 65 |
|
66 | | -1. Bump and tag the version: |
67 | | - |
68 | | - **First** bump `Cargo.toml`, `pyproject.toml`, and `Makefile` to the new version. **Then** bump the package: |
69 | | - ```bash |
70 | | - npm version patch -m "release %s" |
| 66 | +1. Update tree-sitter CLI. |
71 | 67 | ``` |
72 | | - |
73 | | - Choose `patch`/`minor`/`major` to indicate query compatibility: |
74 | | - - `patch` for bugfixes (no changes to queries needed) |
75 | | - - `minor` for added nodes (queries may need changes to use new nodes but will not error) |
76 | | - - `major` for removed or renamed nodes (queries will error if not adapted), other breaking changes |
77 | | - |
78 | | -2. Bump to prerelease, without creating a tag: |
79 | | - ```bash |
80 | | - npm version --no-git-tag-version prerelease --preid dev |
81 | | - git add package*.json Cargo.toml pyproject.toml Makefile |
82 | | - git commit -m bump |
| 68 | + npm install tree-sitter-cli |
| 69 | + ``` |
| 70 | +2. Bump the version. |
| 71 | + ``` |
| 72 | + tree-sitter version x.y.z |
| 73 | + ``` |
| 74 | + - Choose `patch`/`minor`/`major` to indicate query compatibility: |
| 75 | + - `patch` for bugfixes (no changes to queries needed) |
| 76 | + - `minor` for added nodes (queries may need changes to use new nodes but will not error) |
| 77 | + - `major` for removed or renamed nodes (queries will error if not adapted), other breaking changes |
| 78 | +3. Regenerate and test. |
| 79 | + ``` |
| 80 | + tree-sitter generate && tree-sitter test |
| 81 | + ``` |
| 82 | +4. Commit the generated files |
| 83 | + ``` |
| 84 | + git add . |
| 85 | + git commit -m 'release' |
| 86 | + ``` |
| 87 | +5. Push |
83 | 88 | ``` |
84 | | -3. Push: |
85 | | - ```bash |
86 | | - git push && git push --tags |
| 89 | + git push |
87 | 90 | ``` |
88 | | -4. Release the tagged commit: https://github.com/neovim/tree-sitter-vimdoc/releases/new |
| 91 | +6. Tag and release: https://github.com/neovim/tree-sitter-vimdoc/releases/new |
0 commit comments