diff options
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | Makefile.build.mk | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cdc29511..6e384957 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ default: .common: before_script: - - make setup + - make cisetup variables: GOPATH: $CI_PROJECT_DIR/.GOPATH cache: diff --git a/Makefile.build.mk b/Makefile.build.mk index c3294ffe..3202b0de 100644 --- a/Makefile.build.mk +++ b/Makefile.build.mk @@ -9,6 +9,11 @@ setup: .GOPATH/.ok # Installing dev tools defined in go.tools awk '/_/ {print $$2}' ./tools/main.go | xargs -tI % go install ${V:+-v -x} -modfile=tools/go.mod -mod=mod % +cisetup: .GOPATH/.ok + mkdir -p bin/ + # Installing dev tools defined in go.tools + awk '/_/ {print $$2}' ./tools/main.go | grep -v -e mockgen -e golangci | xargs -tI % go install ${V:+-v -x} -modfile=tools/go.mod -mod=mod % + generate-mocks: .GOPATH/.ok $Q bin/mockgen -source=internal/interface.go -destination=internal/mocks/mocks.go -package=mocks $Q bin/mockgen -source=internal/source/source.go -destination=internal/mocks/source.go -package=mocks |