diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9b503e4..eb59f01 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,6 +57,6 @@ jobs: - name: Ensure "make generate" has been run run: | - cd multinode && make rm-mocked && make generate + make rm-mocked && make generate git add --all git diff --stat --cached --exit-code diff --git a/Makefile b/Makefile index 94eb955..12aa563 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,19 @@ .PHONY: gomods gomods: ## Install gomods - go install github.com/jmank88/gomods@v0.1.3 + go install github.com/jmank88/gomods@v0.1.5 .PHONY: gomodtidy gomodtidy: gomods gomods tidy -.PHONY: lint-workspace lint -GOLANGCI_LINT_VERSION := 1.62.2 -GOLANGCI_LINT_COMMON_OPTS := --max-issues-per-linter 0 --max-same-issues 0 -GOLANGCI_LINT_DIRECTORY := ./golangci-lint +.PHONY: mockery +mockery: $(mockery) ## Install mockery. + go install github.com/vektra/mockery/v2@v2.46.3 -lint-workspace: - @./script/lint.sh $(GOLANGCI_LINT_VERSION) "$(GOLANGCI_LINT_COMMON_OPTS)" $(GOLANGCI_LINT_DIRECTORY) +.PHONY: generate +generate: mockery + find . -type f -name .mockery.yaml -execdir mockery \; ## Execute mockery for all .mockery.yaml files -lint: - @./script/lint.sh $(GOLANGCI_LINT_VERSION) "$(GOLANGCI_LINT_COMMON_OPTS)" $(GOLANGCI_LINT_DIRECTORY) "--new-from-rev=origin/main" \ No newline at end of file +.PHONY: rm-mocked +rm-mocked: + grep -rl "^// Code generated by mockery" | grep .go$ | xargs -r rm \ No newline at end of file diff --git a/multinode/Makefile b/multinode/Makefile deleted file mode 100644 index da4a16d..0000000 --- a/multinode/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -.PHONY: gomods -gomods: ## Install gomods - go install github.com/jmank88/gomods@v0.1.3 - -.PHONY: gomodtidy -gomodtidy: gomods - gomods tidy - -.PHONY: mockery -mockery: $(mockery) ## Install mockery. - go install github.com/vektra/mockery/v2@v2.46.3 - -.PHONY: generate -generate: mockery - mockery - -.PHONY: rm-mocked -rm-mocked: - grep -rl "^// Code generated by mockery" | grep .go$ | xargs -r rm \ No newline at end of file