make sure we use pristine go.mod for test

This commit is contained in:
Josh Humphries 2020-05-11 21:57:38 -04:00
parent 8e2cf9b3c2
commit 4c42b1d47a
1 changed files with 11 additions and 1 deletions

View File

@ -6,7 +6,17 @@ dev_build_version=$(shell git describe --tags --always --dirty)
# they are just too noisy to be a requirement for a CI -- we don't even *want* # they are just too noisy to be a requirement for a CI -- we don't even *want*
# to fix some of the things they consider to be violations. # to fix some of the things they consider to be violations.
.PHONY: ci .PHONY: ci
ci: deps checkgofmt vet staticcheck ineffassign predeclared test ci: backup_gomod deps checkgofmt vet staticcheck ineffassign predeclared restore_gomod test
.PHONY: backup_gomod
backup_gomod:
cp go.mod go.mod.bk
.PHONY: restore_gomod
restore_gomod:
if [ -f go.mod.bk ]; then \
mv go.mod.bk go.mod \
fi
.PHONY: deps .PHONY: deps
deps: deps: