Only run gospace tidy when go.mod or go.sum change (#1214)
This commit is contained in:
parent
5c2b67db63
commit
5f59c46ed9
@ -62,7 +62,7 @@ matrix:
|
||||
- go run ./scripts/check-imports.go ./...
|
||||
- go run ./scripts/protobuf.go --protoc=$HOME/protoc/bin/protoc lint
|
||||
- golangci-lint run
|
||||
- gospace istidy
|
||||
- ./scripts/check-travis-tidy.sh
|
||||
|
||||
### integration tests ###
|
||||
- env: MODE=integration
|
||||
|
12
scripts/check-travis-tidy.sh
Executable file
12
scripts/check-travis-tidy.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -ueo pipefail
|
||||
|
||||
CHANGES=$(git diff --name-only $TRAVIS_COMMIT_RANGE -- go.mod go.sum)
|
||||
|
||||
if [ -z "$CHANGES" ]
|
||||
then
|
||||
echo "go modules not changed"
|
||||
else
|
||||
echo "go module changes detected"
|
||||
gospace tidy
|
||||
fi
|
Loading…
Reference in New Issue
Block a user