-
Notifications
You must be signed in to change notification settings - Fork 5
How to manually bump cmd‐help version in bat's submodules
In the bat
project, they use a sample test messsage to test cmd-help
for regression.
We also track that sample (bat-short-0.22.1
) in this project: source, highlighted.
If the highlighted version changes while running tests (and we merge the changes into main
), we have to propagate that test change to bat
.
That's because, normally, cmd-help.sublime-syntax
is automatically updated by bat
's Dependabot setup. (example)
But when the regression test message changes, we break the tests there, Dependabot flags our change, and the update won't proceed. (example)
So we have to update the highlighting of that message in bat
and make a PR. (example)
-
Clone the
bat
repository andcd
in -
Update the submodule to latest:
git submodule update --remote assets/syntaxes/02_Extra/cmd-help
-
Build and install a
bat
binary with modified syntaxes and themes:bash assets/create.sh cargo install --path . --locked --force
-
Run syntax highlighting regression tests to update our test:
tests/syntax_tests/update.sh
-
Git add only the updated highlighted test file for cmd-help, nothing else
-
Update the Changelog in their style (see PR example above)
-
Commit everything together
-
Make the PR
Consider if you want to downgrade bat
from this unreleased version to the previous one you had installed.
In any case, run this to recover the custom bat
syntaxes & themes for your bat
installation:
bat cache --build