如何从 bee pack 中排除多个目录?

huangapple go评论95阅读模式
英文:

How to exclude multiple directories from bee pack

问题

如何在bee pack工具中排除多个目录?

bee pack -ba "-tags prod" -exr=^userfiles$

这个命令可以排除特定的目录。但是我想要排除名为userfiles、deploy和docs的目录。我尝试了以下命令:

-exr=[^userfiles$,^deploy$,^docs$]
-exr=["^userfiles$","^deploy$","^docs$"]

但是这两个命令都没有起作用。

英文:

How do I exclude multiple directories from bee pack tool?

bee pack -ba "-tags prod" -exr=^userfiles$

this excludes this particular directory. But I want to exclude directories named as userfiles, deploy, docs. I tried

-exr=[^userfiles$,^deploy$,^docs$]
-exr=["^userfiles$","^deploy$","^docs$"]

both of these didn't work.

答案1

得分: 2

由于exr是一个正则表达式,你可以尝试使用(使用re2语法)一个复合表达式:

-exr=^(?:userfile|deploy|docs)$

OP Joseph评论中确认了这个想法:

goop exec bee pack -ba "-tags prod" -exr="^(?:userfiles|deploy|tests|docs)$"
英文:

Since exr is a regexp, you could try and use (using the re2 syntax) a composite:

-exr=^(?:userfile|deploy|docs)$

The OP Joseph confirms the idea in the comments:

goop exec bee pack -ba "-tags prod" -exr="^(?:userfiles|deploy|tests|docs)$"

huangapple
  • 本文由 发表于 2015年4月26日 03:16:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/29869580.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定