Commit 0f72fe8c authored by Kirill Smelkov's avatar Kirill Smelkov

golang: Make gowork.install optional

Some software releases - e.g. wendelin.core - only use ${go:exe} and
does not put anything into ${gowork:install}.
parent e2a4b391
......@@ -103,7 +103,7 @@ environment-extra =
# buildflags = -race
#
#
# Users should add `install` field to [gowork] to describe packages they want to
# Users can also add `install` field to [gowork] to describe packages they want to
# be installed (+ automatically their dependencies are installed too). e.g.
#
# [gowork]
......@@ -139,6 +139,9 @@ buildflags =
# empty pkg-config path by default
cpkgpath =
# by default don't `go install` anything
install =
# everything is done by dependent parts
recipe = plone.recipe.command
command = :
......@@ -166,10 +169,10 @@ update-command = ${:command}
stop-on-error = true
# install go packages
# clients should put package list to install to gowork:install ("..." requests installing everything)
# clients can put package list to install to gowork:install ("..." requests installing everything)
[gowork.goinstall]
recipe = plone.recipe.command
command = bash -c ". ${gowork:env.sh} && go install ${gowork:buildflags} -v $(echo -n '${gowork:install}' |tr '\n' ' ')"
command = bash -c ". ${gowork:env.sh} && test -z '${gowork:install}' || go install ${gowork:buildflags} -v $(echo -n '${gowork:install}' |tr '\n' ' ')"
update-command = ${:command}
stop-on-error = true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment