Skip to content
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

feat: support gcloudignore #65

Merged
merged 3 commits into from
Jun 9, 2021
Merged

feat: support gcloudignore #65

merged 3 commits into from
Jun 9, 2021

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
Development

Successfully merging this pull request may close these issues.

.gcloudignore is not recognized.
3 participants