Return the changes between two directory, excluding the specified path patterns from the comparison FIXME: had to copy-paste across modules
(before, after *dagger.Directory, exclude []string)
| 401 | // Return the changes between two directory, excluding the specified path patterns from the comparison |
| 402 | // FIXME: had to copy-paste across modules |
| 403 | func changes(before, after *dagger.Directory, exclude []string) *dagger.Changeset { |
| 404 | if exclude == nil { |
| 405 | return after.Changes(before) |
| 406 | } |
| 407 | return after. |
| 408 | // 1. Remove matching files from after |
| 409 | Filter(dagger.DirectoryFilterOpts{Exclude: exclude}). |
| 410 | // 2. Copy matching files from before |
| 411 | WithDirectory("", before.Filter(dagger.DirectoryFilterOpts{Include: exclude})). |
| 412 | Changes(before) |
| 413 | } |
| 414 | |
| 415 | var targets = []struct { |
| 416 | Name string |
no test coverage detected