Google App Engine App.yaml 配置用于跳过文件以忽略 Mercurial 文件
我在skip_files 顶部添加了一行,以使应用程序引擎部署跳过所有以.hg 开头的文件,例如.hgignore 文件和.hg 目录。这会忽略整个 .hg 目录及其所有文件和子目录吗?
skip_files:
- ^(.*/)?\.hg*$
- ^(.*/)?app\.yaml
- ^(.*/)?app\.yml
- ^(.*/)?index\.yaml
- ^(.*/)?index\.yml
- ^(.*/)?#.*#
- ^(.*/)?.*~
- ^(.*/)?.*\.py[co]
- ^(.*/)?.*/RCS/.*
- ^(.*/)?\..*
I have added a line at the top of skip_files to make app engine deployment skip all files starting with .hg such as the .hgignore file and the .hg directory. Will this ignore the whole .hg directory and all its files and subdirectories?
skip_files:
- ^(.*/)?\.hg*$
- ^(.*/)?app\.yaml
- ^(.*/)?app\.yml
- ^(.*/)?index\.yaml
- ^(.*/)?index\.yml
- ^(.*/)?#.*#
- ^(.*/)?.*~
- ^(.*/)?.*\.py[co]
- ^(.*/)?.*/RCS/.*
- ^(.*/)?\..*
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认unix 样式隐藏的文件和文件夹将被跳过。换句话说,任何以点 (.) 开头的文件都已被跳过。如果列表中的最后一行末尾没有缺少的
*
(我假设 \s 实际上在那里),那么这就是列表中的最后一行将执行的操作。您的建议:
^(.*/)?.hg$
不太正确。要匹配以.hg
开头的任何文件,您需要^(.*/)?\.hg.*
。您应该阅读正则表达式。
编辑:从 appcfg.py update -v 添加转储。
By default unix style hidden files and folders are skipped. In other words, any file starting with a dot (.) is already skipped. That is what the last line in your list would do if it did not have the missing
*
at the end (I assume the \s are actually there).Your suggestion of:
^(.*/)?.hg$
is not quite right. To match any file starting with.hg
you need^(.*/)?\.hg.*
.You should read about regular expressions.
edit: adding dump from appcfg.py update -v .