buildout.cfg 783 Bytes
Newer Older
1 2 3 4 5 6 7 8
[buildout]
extends =
  ../../component/golang/buildout.cfg

parts =
  caddy

[gowork]
9
# Caddy 1.x+ uses go modules, for which gowork does not work yet
10
golang  = ${golang1.12:location}
11
install =
12 13 14 15 16

[gowork.goinstall]
command = :
depends =
  ${caddy:recipe}
17 18

[caddy]
19
# revision and repository can be used to control which caddy version is used
20
revision = v1.0.3
21
repository = github.com/caddyserver/caddy/caddy
22 23 24 25 26 27 28 29 30 31 32 33

recipe  = plone.recipe.command
update-command = ${:command}
stop-on-error = True
# GO111MODULE=on enables go modules support
# the chmod is needed as modules are fetched with u-w
command =
  . ${gowork:env.sh} &&
  cd ${gowork:directory} &&
  export GO111MODULE=on &&
  go get ${:repository}@${:revision} &&
  chmod -R u+w .
34
output = ${gowork:bin}/caddy
35
location = ${:output}