diff options
author | Dan Duvall <dduvall@wikimedia.org> | 2017-04-19 12:18:04 -0700 |
---|---|---|
committer | Dan Duvall <dduvall@wikimedia.org> | 2017-04-19 12:18:04 -0700 |
commit | 4a3550fc26296165e917e966335721de05d1d63e (patch) | |
tree | 2024cb5e0b9212a05e0ef6812be46d4c01589a02 /config | |
parent | 82e80325b9def5054c466c2d44b1a031e0eeab68 (diff) | |
download | blubber-4a3550fc26296165e917e966335721de05d1d63e.tar.gz |
Allow configuration of whether to copy in source tree
Diffstat (limited to 'config')
-rw-r--r-- | config/common.go | 3 | ||||
-rw-r--r-- | config/npm.go | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/config/common.go b/config/common.go index ae2e438..782c454 100644 --- a/config/common.go +++ b/config/common.go @@ -5,6 +5,7 @@ type CommonConfig struct { Apt AptConfig `json:apt` Npm NpmConfig `json:npm` Run RunConfig `json:run` + CopiesTree bool `json:copiestree` EntryPoint []string `json:entrypoint` } @@ -17,6 +18,8 @@ func (cc1 *CommonConfig) Merge(cc2 CommonConfig) { cc1.Npm.Merge(cc2.Npm) cc1.Run.Merge(cc2.Run) + cc1.CopiesTree = cc1.CopiesTree || cc2.CopiesTree + if len(cc1.EntryPoint) < 1 { cc1.EntryPoint = cc2.EntryPoint } diff --git a/config/npm.go b/config/npm.go index d563045..54168ed 100644 --- a/config/npm.go +++ b/config/npm.go @@ -27,10 +27,8 @@ func (npm NpmConfig) Commands() []string { buffer.WriteString("npm install") if npm.Env == "production" { - buffer.WriteString(" --production") + buffer.WriteString(" --production && npm dedupe") } - buffer.WriteString(" && npm dedupe") - return []string{buffer.String()} } |