Skip to content
This repository was archived by the owner on Dec 20, 2017. It is now read-only.

允许通过 .leanengineignore 定义部署时不上传的文件#121

Merged
aisk merged 1 commit intoleancloud:masterfrom
jysperm:ignore-files
Jan 23, 2016
Merged

允许通过 .leanengineignore 定义部署时不上传的文件#121
aisk merged 1 commit intoleancloud:masterfrom
jysperm:ignore-files

Conversation

@jysperm
Copy link
Contributor

@jysperm jysperm commented Jan 21, 2016

@jysperm jysperm changed the title 允许通过 .leanengineignore 或 .npmignpre 定义部署时不上传的文件 允许通过 .leanengineignore 或 .npmignore 定义部署时不上传的文件 Jan 21, 2016
@aisk
Copy link
Contributor

aisk commented Jan 21, 2016

不是很确定 .npmignore 要不要支持,因为我们本来就支持多个运行时环境,只支持 node 有点奇怪。

@jysperm
Copy link
Contributor Author

jysperm commented Jan 21, 2016

忘记这事了,看来这个也要做成可配置的

@aisk
Copy link
Contributor

aisk commented Jan 21, 2016

我觉得得考虑不同语言的 ignore,我们自己的 ignore,git 的 ignore,太复杂了,不如在 deploy 的时候接受一个参数 --ignorefile=xxx,默认使用 .leanengineignore 比较好,想修改的用户自己指定。

@jysperm jysperm changed the title 允许通过 .leanengineignore 或 .npmignore 定义部署时不上传的文件 允许通过 .leanengineignore 定义部署时不上传的文件 Jan 22, 2016
@jysperm
Copy link
Contributor Author

jysperm commented Jan 22, 2016

@aisk 那就先只支持 .leanengineignore 好了

@aisk
Copy link
Contributor

aisk commented Jan 22, 2016

LGTM

aisk added a commit that referenced this pull request Jan 23, 2016
允许通过 .leanengineignore 定义部署时不上传的文件
@aisk aisk merged commit f14c9b0 into leancloud:master Jan 23, 2016
@aisk aisk removed the in progress label Jan 23, 2016
@jysperm jysperm deleted the ignore-files branch January 23, 2016 16:24
@jysperm
Copy link
Contributor Author

jysperm commented Jan 26, 2016

补充一下典型用法,例如新建一个 .leanengineignore 中包含:

  • **/node_modules/** 忽略任意层级下的 node_modules 目录
  • *.pyc 忽略 pyc 文件

@sdjcw
Copy link
Contributor

sdjcw commented Jan 26, 2016

我们最终是希望通过 rsync 来进行部署,所以需要确认下 rsync 支持的 exclude pattern

@jysperm
Copy link
Contributor Author

jysperm commented Jan 26, 2016

大概看了一下,语法很接近,但细节上可能还是有不兼容的地方的,我觉得可以先发布这个功能,在文档上只介绍最基本的写法,或者可以暂时不写在文档上,因为只是很少一部分规模大或者构建流程复杂的用户才需要。

@jysperm
Copy link
Contributor Author

jysperm commented Jan 26, 2016

https://github.com/isaacs/node-glob
http://linux.die.net/man/1/rsync (Filter Rules 一节)

从描述看,rsync 更复杂,我们支持的是 rsync 的一个子集。

@GongT
Copy link
Contributor

GongT commented Jan 30, 2016

每次部署都要3~4分钟且不一定能成功的我只好在这里默默的点个赞
希望可以跳过安装备份依赖的过程。。。(而且还不需要自己上传node_modules

话说忽略任意层级下的node_modules 会常用吗?

@wangxiao
Copy link
Contributor

wangxiao commented Feb 1, 2016

@GongT 这个问题是之前实现导致的,目前在升级新版,新版可以提高部署速度。这个 issue 是 ignore 的功能。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants