Travis CIcaching:忽略来自caching的特定文件夹/文件
我在.travis.yml
有以下configuration:
language: node_js node_js: - '5.0.0' sudo: false cache: bundler: true directories: - node_modules
我的一个软件包是一个Github分支,内容改变但版本保持不变。 发生什么事情是caching不失效,在这一点上没有任何错误。 但是我想知道是否有一种方法可以从caching构造中排除一个特定的文件夹,如下所示:
language: node_js node_js: - '5.0.0' sudo: false cache: bundler: true directories: - node_modules - !node_modules/grommet
其中!node_modules/grommet
将被从caching索引中排除。
我尝试使用before_cache
,如此处所述。 但没有运气。
任何帮助赞赏…
我不得不手动重新安装模块。 在你的情况,你的travis.yml
install
部分应该是这样的:
install: - npm uninstall grommet - npm install