Skip to content

Commit

Permalink
Enforce go mod
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Büringer [email protected]
  • Loading branch information
sbueringer committed Aug 7, 2024
1 parent 070467f commit f74b0d6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,20 @@ test: ## Run the test.sh script which will check all.
TRACE=1 ./test.sh

test-all:
$(MAKE) verify-modules
$(MAKE) test

.PHONY: modules
modules: ## Runs go mod to ensure modules are up to date.
go mod tidy

.PHONY: verify-modules
verify-modules: modules ## Verify go modules are up to date
@if !(git diff --quiet HEAD -- go.sum go.mod); then \
git diff; \
echo "go module files are out of date, please run 'make modules'"; exit 1; \
fi

## --------------------------------------
## Cleanup / Verification
## --------------------------------------
Expand Down

0 comments on commit f74b0d6

Please sign in to comment.