From 0d9e9fb5989ebf59f76684056c34e764ec31bc5b Mon Sep 17 00:00:00 2001 From: Tit Petric Date: Fri, 15 Mar 2019 01:49:56 +0100 Subject: [PATCH] fix(build): go fmt, mock generation --- .drone.yml | 1 + Makefile | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 80ac47d84..597738418 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,6 +14,7 @@ steps: GOARCH: amd64 commands: - apk add --no-cache git make + - go fmt ./cmd/... ./internal/... ./crm/... ./messaging/... ./system/... - go get -u github.com/golang/mock/gomock - go get -u github.com/golang/mock/mockgen - make mocks diff --git a/Makefile b/Makefile index 5977d898d..40b506aa8 100644 --- a/Makefile +++ b/Makefile @@ -128,7 +128,7 @@ qa: vet critic test mocks: $(GOMOCK) # Cleanup all pre-generated - rm -f */*/*_mock_test.go */*/mocks/* + find -name '*_mock_test.go' -path internal/ -delete # See https://github.com/golang/mock for details $(MOCKGEN) -package service -source crm/internal/service/notification.go -destination crm/internal/service/notification_mock_test.go @@ -140,7 +140,7 @@ mocks: $(GOMOCK) $(MOCKGEN) -package service -source system/internal/service/role.go -destination system/internal/service/role_mock_test.go $(MOCKGEN) -package service -source system/internal/service/user.go -destination system/internal/service/user_mock_test.go - # $(MOCKGEN) -package mail -source internal/mail/mail.go -destination internal/mail/mail_mock_test.go + $(MOCKGEN) -package mail -source internal/mail/mail.go -destination internal/mail/mail_mock_test.go $(MOCKGEN) -package rules -source internal/rules/interfaces.go -destination internal/rules/resources_mock_test.go mkdir -p system/internal/repository/mocks