Closed patrzhan closed 1 year ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
a1a3ffe
) 98.01% compared to head (bbb8f40
) 98.02%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Issue #, if available: https://github.com/aws-greengrass/aws-greengrass-gdk-cli/issues/143 Description of changes: Update zip build to accept full globs to match with when picking files/directories to exclude from the build. In GDK 1.4.0 and earlier, glob-like patterns were provided to match individual file names against, regardless of the subdirectory level. In PR: https://github.com/aws-greengrass/aws-greengrass-gdk-cli/pull/253, this was changed to only exclude items at the root level. This change supports full glob notation including directories, so that items that should only be excluded from root (i.e.
test*
) can do so, but items that should still be excluded from all subdirectories such as node_modules folders can also be excluded.This also means the defaults have changed. The default globs for exclusion have been set to
test*
,**/.*
, and**/node_modules
, meaning that test* is matched only against the root directory, but hidden files and node_modules are excluded at any level by default. This also means that any custom patterns provided in the gdk-config.json file may need to be changed, as the behavior may have changed.Why is this change necessary: Bugfix for the linked issue while maintaining support for exclusion in any subdirectory level.
How was this change tested: Manually tested changes with a sample project to confirm that expected directories and files were excluded based on various provided globs. Also updated unit/integration tests to test the functionality that is changed.
Any additional information or context required to review the change: Since this feature impacts default values and may change behavior of existing projects that upgrade to this version, input is needed on how to mitigate impact if necessary.
Checklist:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.