Skip to content

Commit 6bd490a

Browse files
committed
Add make target to verify dependencies
Signed-off-by: Ben Segall <[email protected]>
1 parent acc5451 commit 6bd490a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,10 @@ install:
3535
vendor:
3636
$(GO) mod tidy
3737
$(GO) mod vendor
38-
$(GO) mod verify
38+
$(GO) mod verify
39+
40+
.PHONY: verify-dependencies
41+
verify-dependencies: vendor
42+
@test -z "$$(git status --porcelain -- go.mod go.sum vendor/)" \
43+
|| (echo -e "git status:\n $$(git status -- go.mod go.sum vendor/)\nerror: vendor/, go.mod and/or go.sum not up to date. Run \"make vendor\" to update"; exit 1) \
44+
&& echo "all vendor files are up to date."

0 commit comments

Comments
 (0)