-
Notifications
You must be signed in to change notification settings - Fork 8
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
Ignore file support when finding buildpacks #673
Conversation
Previously we could rely on knowing that packaged buildpacks would be written to a location within the `target` directory configured in Crate. This was easy to determine through program code and could be supplied to `find_buildpack_dirs` so that packaged buildpacks weren't accidentally included when searching for buildpacks. With the changes introduced in [#583](#583) it is no longer possible to easily determine the output location for packaged buildpacks. This PR adds the [ignore](https://crates.io/crates/ignore) crate to provide directory iteration that respects standard ignore files. This will give the user the ability to configure where we search within a project for buildpacks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My requested changes are the comments @edmorley made. ;-)
* updated error message * using iterator instead of loop for finding buildpack dirs logic * added a quick test to ensure that ignores work * updated changelog entry
* updated error message * using iterator instead of loop for finding buildpack dirs logic * added a quick test to ensure that ignores work * updated changelog entry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small comments, otherwise: ship it!
* updated test comments * added PR link to changelog entry
* main: Ignore file support when finding buildpacks (#673) Apply rustfmt to README example (#676) Update example `cargo libcnb package` log output in READMEs (#675) Add CLI usage help output to libcnb-cargo README (#674) Fix lint errors with Rust 1.73 (#672) Include README.md in lib.rs (#667) # Conflicts: # CHANGELOG.md
Previously we could rely on knowing that packaged buildpacks would be written to a location within the
target
directory configured in Crate. This was easy to determine through program code and could be supplied tofind_buildpack_dirs
so that packaged buildpacks weren't accidentally included when searching for buildpacks.With the changes introduced in #583 it is no longer possible to easily determine the output location for packaged buildpacks. This PR adds the ignore crate to provide directory iteration that respects standard ignore files. This will give the user the ability to configure where we search within a project for buildpacks.
Related to #666