ashvardanian / tinysemver

Tiny Semantic Versioning (SemVer) library and GitHub CI, that doesn't depend on 300K lines of JavaScript code and fits in a single Python file
https://github.com/marketplace/actions/tinysemver
Apache License 2.0
17 stars 3 forks source link

Pre-commit hooks #9

Open ashvardanian opened 2 months ago

ashvardanian commented 2 months ago

In many cases, after we update the Cargo.toml, we may want to update the Cargo.lock. Similar procedures are common in JS and other ecosystems. So before committing the changes we should allow invoking some external script, similar to how the old CI worked for StringZilla, USearch, and SimSIMD.

# Update the version in the Cargo.lock file, but don't report an error if it fails...
# as `cargo` may not be available in the current environment.
cargo update || true

For that we should probably add a new argument & environment variable, that will contain the shell command.