Skip to content

How to manually bump cmd‐help version in bat's submodules

Víctor González Prieto edited this page Jan 2, 2024 · 14 revisions

In the bat project, the sample test messsage we use to test cmd-help for regression comes from bat v0.22.1.

We also track that sample in this project (source, highlighted).

If the highlighted version changes while running tests (and we merge into main), we have to propagate that 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 and the Dependabot update won't proceed. (example)

So we have to update the highlighting of that message in bat and make a PR:

  • Clone the bat repository and cd in

  • Update the submodule to latest:

    git submodule update --remote assets/syntaxes/02_Extra/cmd-help
  • Build a bat binary with modified syntaxes and themes:

    bash assets/create.sh
    cargo install --path . --locked --force
  • Run syntax highlighting regression tests to update the highlighted version of the test:

    tests/syntax_tests/update.sh
  • Update the Changelog in their style

  • Commit everything together

  • Make a PR (example)


References:

Clone this wiki locally