How can I check that the app.yaml skip_files regex is working correctly with App Engine?

I have app.yaml skip_files

as such:

skip_files:
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$

      

How can I specify exactly which files are being skipped? I am using OSX, so my find util has no extended regex as far as I know.

+3


source to share


3 answers


Run appcfg.py with option -v

. This will show you each file being processed and tell you if it was skipped due to your skip_files or not.



+2


source


As stated in the documents URL and file path patterns use POSIX extended regular expression syntax

.



So, you can use the POSIX regex tester to check if regex expressions work as expected. For example. http://www.rexv.org/

0


source


If you have a question: "How can I guarantee that I don't accidentally have files that get skipped", then one approach would be to borrow code from the SDK and write a script. It looks like the FileIterator (in google / appengine / tools / appcfg.py) does what you need. (The disclaimer I am obliged to communicate is that FileIterator is not a published API and may change at the whim of the App Engine team.)

Understanding POSIX regular expressions can calm your mind. The list you are showing allows you to edit temporary files (1,2),. Pyc and .pyo files (3), RCS * files (4) and any dotfiles (5).

* RCS is an old school version control system. I only know of one person who still uses it. If you are using git, then .git (and content) is protected by the dotfiles template.

0


source







All Articles