Skip to content

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

@Systemcluster

Description

@Systemcluster

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions