diff options
author | Nick White <git@njw.name> | 2020-10-19 12:39:40 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2020-10-19 12:39:40 +0100 |
commit | b52c3224b1b18bf3965e260942622605cf493a22 (patch) | |
tree | 9a46016716e98b0db0bbd9ddb86ed3061cd7210a /roles/pipeliner/templates | |
parent | 9cbdd70c176b7ab11eea795a60c12caebe5ece9c (diff) |
Stop using GOPATH for source code to ensure go modules are enabled
Source code in GOPATH disables modules mode when GO111MODULES=auto,
which is the default. Keeping it out should make things reliable here.
Note that this is not yet tested.
Diffstat (limited to 'roles/pipeliner/templates')
-rw-r--r-- | roles/pipeliner/templates/updatepipeline.j2 | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/roles/pipeliner/templates/updatepipeline.j2 b/roles/pipeliner/templates/updatepipeline.j2 index 5b76f9a..efe04e1 100644 --- a/roles/pipeliner/templates/updatepipeline.j2 +++ b/roles/pipeliner/templates/updatepipeline.j2 @@ -1,14 +1,11 @@ #!/bin/sh -g="/home/{{ ansible_user }}/src/go" +s="/home/{{ ansible_user }}/src" t="/home/{{ ansible_user }}/trainings" -# 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" -cd "$g/src/rescribe.xyz/bookpipeline" && \ +cd "$s/bookpipeline" && \ git pull && \ -GO111MODULE=on go install ./... && \ -sudo cp "$g/bin/bookpipeline" /usr/local/bin/ || exit 1 +go install ./... && \ +sudo cp "$HOME/go/bin/bookpipeline" /usr/local/bin/ || exit 1 cd "$t" && git pull && \ sudo cp "$t"/* /usr/local/share/tesseract-ocr/tessdata/ |