Skip to content

Conversation

bharathkkb
Copy link
Contributor

fixes #36

@bharathkkb bharathkkb requested a review from a team as a code owner June 1, 2021 17:53
@google-cla google-cla bot added the cla: yes label Jun 1, 2021
Comment on lines -59 to +62
archive.directory(dirPath, false);
getFiles(dirPath).forEach((filepath) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you see that archive.directory() can take a third argument, which as far as I can see is a callback that can be used for some kind of filtering? https://github.com/archiverjs/node-archiver/blob/f6c9cc2fa6a167594c82428faf22dc59dbba7404/lib/core.js#L658-L661

Copy link
Contributor Author

@bharathkkb bharathkkb Jun 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @voxpelli, thanks for the review.
I tried to do this with just archiver but found that all filtering in archiver is done via minimatch which did not work due to isaacs/minimatch#46. So for example, this test was failing https://github.com/google-github-actions/deploy-cloud-functions/blob/support-gcloudignore/tests/test-func-ignore-node/.gcloudignore

@bharathkkb bharathkkb merged commit bc4a13e into main Jun 9, 2021
@bharathkkb bharathkkb deleted the support-gcloudignore branch June 9, 2021 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants