diff options
author | Nick White <git@njw.name> | 2020-03-10 12:33:17 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2020-03-10 12:33:17 +0000 |
commit | edae481eafca9c6414204d94880118c4106c8bab (patch) | |
tree | 0ea7df5d1f2e5930f46fecda80dc96b388b24eb9 /roles | |
parent | 4ceb032f150d287fad2af9c5e9dfb51b93e315a5 (diff) |
Use go modules when building bookpipeline
Diffstat (limited to 'roles')
-rw-r--r-- | roles/pipeliner/templates/updatepipeline.j2 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/roles/pipeliner/templates/updatepipeline.j2 b/roles/pipeliner/templates/updatepipeline.j2 index d73c2da..0f5b439 100644 --- a/roles/pipeliner/templates/updatepipeline.j2 +++ b/roles/pipeliner/templates/updatepipeline.j2 @@ -2,7 +2,11 @@ g="/home/{{ ansible_user }}/src/go" t="/home/{{ ansible_user }}/trainings" -GOPATH="$g" go get -u rescribe.xyz/bookpipeline/... && \ +# The extra go install step ensures that go modules are used +# (they don't work for the go get stage in go 1.11) +export GOPATH="$g" +go get -u rescribe.xyz/bookpipeline/... && \ +cd "$g/src/rescribe.xyz/bookpipeline" && go install ./... && \ sudo cp "$g/bin/bookpipeline" /usr/local/bin/ || exit 1 cd "$t" && git pull && \ |