Created
December 13, 2023 02:48
-
-
Save danielpza/321437f3a9f23ad36f6824220c3bc0c7 to your computer and use it in GitHub Desktop.
cloud functions gitignore hack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HACK seems to be a bug with cloud functions gcloudignore, see https://stackoverflow.com/questions/52976199/gcloudignore-doesnt-allow-standard-wildcard-whitelist/54959530#54959530, https://unix.stackexchange.com/questions/247012/how-to-recursively-remove-all-but-list-of-files | |
gcloud meta list-files-for-upload >keep | |
rm -rf node_modules | |
files_to_delete=$(find . -type f | grep -vFf keep) | |
rm $(find . -type f | grep -vFf keep) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment