Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
* updated test comments
* added PR link to changelog entry
  • Loading branch information
colincasey committed Sep 18, 2023
1 parent ad247ff commit b5770d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `libcnb-cargo`:
- No longer outputs paths for non-libcnb.rs and non-meta buildpacks. ([#657](https://github.com/heroku/libcnb.rs/pull/657))
- Build output for humans changed slightly, output intended for machines/scripting didn't change. ([#657](https://github.com/heroku/libcnb.rs/pull/657))
- When performing buildpack detection, standard ignore files (`.ignore` and `.gitignore`) will be respected
- When performing buildpack detection, standard ignore files (`.ignore` and `.gitignore`) will be respected. ([#673](https://github.com/heroku/libcnb.rs/pull/673))

## [0.14.0] - 2023-08-18

Expand Down
10 changes: 8 additions & 2 deletions libcnb-cargo/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ fn package_command_error_when_run_in_project_with_no_buildpacks() {
fn package_command_respects_ignore_files() {
let fixture_dir = copy_fixture_to_temp_dir("multiple_buildpacks").unwrap();

// when a git folder is not present, .ignore should be used
// The `ignore` crate supports `.ignore` files. So this first `cargo libcnb package` execution
// just sanity checks that our ignore rules will be respected.
let ignore_file = fixture_dir.path().join(".ignore");
fs::write(&ignore_file, "meta-buildpacks\nbuildpacks\n").unwrap();

Expand All @@ -242,7 +243,12 @@ fn package_command_respects_ignore_files() {

fs::remove_file(ignore_file).unwrap();

// when a git folder is not present, .gitignore can be used
// The `ignore` crate supports `.gitignore` files but only if the folder is within a git repository
// which is the default configuration used in our directory traversal.
// https://docs.rs/ignore/latest/ignore/struct.WalkBuilder.html#method.require_git
//
// So this second `cargo libcnb package` execution just sanity checks that our gitignore rules
// in a git repository will be respected.
fs::create_dir(fixture_dir.path().join(".git")).unwrap();
let ignore_file = fixture_dir.path().join(".gitignore");
fs::write(ignore_file, "meta-buildpacks\nbuildpacks\n").unwrap();
Expand Down

0 comments on commit b5770d6

Please sign in to comment.