From edae481eafca9c6414204d94880118c4106c8bab Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 10 Mar 2020 12:33:17 +0000 Subject: Use go modules when building bookpipeline --- roles/pipeliner/templates/updatepipeline.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'roles') 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 && \ -- cgit v1.2.1-24-ge1ad