From d44ba6d217a0b393c9bd66db6519fc1095f10167 Mon Sep 17 00:00:00 2001 From: James Warren Date: Wed, 22 Aug 2018 08:53:44 +0100 Subject: [PATCH] fix(ci): Build gopath correctly in CI --- {{cookiecutter.name}}/.gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.name}}/.gitlab-ci.yml b/{{cookiecutter.name}}/.gitlab-ci.yml index 216939c..ee92288 100644 --- a/{{cookiecutter.name}}/.gitlab-ci.yml +++ b/{{cookiecutter.name}}/.gitlab-ci.yml @@ -39,5 +39,6 @@ test: image: golang:{{cookiecutter.go}}-alpine script: - apk update && apk add make build-base git - - mkdir -p $GOPATH/src; ln -s $CI_PROJECT_DIR $GOPATH/$SRC; cd $GOPATH/$SRC + - mkdir -p $GOPATH/$(echo $SRC | rev | cut -d'/' -f2- | rev) # mk src directory tree minus last path + - ln -s $CI_PROJECT_DIR $GOPATH/$SRC; cd $GOPATH/$SRC - make test