Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider include/exclude when checking if the package has changed #661

Open
Systemcluster opened this issue May 19, 2023 · 0 comments
Open

Comments

@Systemcluster
Copy link

Currently publish-crates checks if unpublished changes exist by querying GitHub for the last commit date. This is fine in many cases, but will result in false-positives when Cargo.toml contains an include or exclude field.

Instead of querying GitHub, it could make sense to iterate through the crate directory and call git directly, e.g. with git log -1 --pretty="format:%ct" /path/to/file, to get the change time while skipping over non-included files.

As far as I know cargo metadata doesn't contain include and exclude information, so this would require parsing Cargo.toml for those keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant