MarcoIeni / release-plz

Publish Rust crates from CI with a Release PR.

Home Page:https://release-plz.ieni.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check git history up to `.cargo_vcs_info.json` sha

MarcoIeni opened this issue · comments

Motivations

For weird issues, it can happen that release-plz checks the entire history of the project, which is wrong, because it will report the entire repo history in the changelog.

Solution

We can use the sha1 contained in the .cargo_vcs_info.json file, which is included on cargo publish if --allow-dirty is not included.
Docs here.

In the diff algorithm we should stop if we reached this commit. Similar to how we do here:

|| is_commit_too_old(repository, tag_commit.as_deref(), &current_commit_hash)

Don't assume this file always exist.