build: add check for go list

Added a check for go list to
verify the dependencies

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2023-02-15 09:20:47 +01:00 committed by mergify[bot]
parent b57937661f
commit 150d1a5ebb

View File

@ -106,6 +106,8 @@ go-test-api: check-env
mod-check: check-env mod-check: check-env
@echo 'running: go mod verify' @echo 'running: go mod verify'
@go mod verify && [ "$(shell sha512sum go.mod)" = "`sha512sum go.mod`" ] || ( echo "ERROR: go.mod was modified by 'go mod verify'" && false ) @go mod verify && [ "$(shell sha512sum go.mod)" = "`sha512sum go.mod`" ] || ( echo "ERROR: go.mod was modified by 'go mod verify'" && false )
@echo 'running: go list -mod=readonly -m all'
@go list -mod=readonly -m all 1> /dev/null
scripts/golangci.yml: scripts/golangci.yml.in scripts/golangci.yml: scripts/golangci.yml.in
rm -f scripts/golangci.yml.buildtags.in rm -f scripts/golangci.yml.buildtags.in