diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2022-02-07 02:24:59 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2022-02-07 02:24:59 +0300 |
commit | f125379b7e8fc6955d1c7cb2d686862e44628bff (patch) | |
tree | 2226c0a799a52694e293ac4ecaefe00b5a3b0109 /Makefile.util.mk | |
parent | d4a251ae1bb492fee8af0d3d3619bdd3f5bfc1c0 (diff) | |
parent | f180f94fc467a0151d8e7cd7eb76fc8dcb0b6348 (diff) |
Merge branch 'ci/validate-mocks' into 'master'
ci: add mocks-check task to validate mocks
See merge request gitlab-org/gitlab-pages!672
Diffstat (limited to 'Makefile.util.mk')
-rw-r--r-- | Makefile.util.mk | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Makefile.util.mk b/Makefile.util.mk index 692848c7..e9abe846 100644 --- a/Makefile.util.mk +++ b/Makefile.util.mk @@ -49,6 +49,15 @@ deps-check: .GOPATH/.ok exit 1; \ fi; +mocks-check: .GOPATH/.ok generate-mocks + @if git diff --color=always --exit-code -- *_mock.go; then \ + echo "mocks are ok"; \ + else \ + echo ""; \ + echo "mocks needs to be regenerated, please run 'make generate-mocks' and commit them";\ + exit 1; \ + fi; + deps-download: .GOPATH/.ok go mod download |