mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-06 21:36:30 +00:00
Install goimports if needed (travis)
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
This commit is contained in:
@@ -19,6 +19,8 @@ HACK_DIR=$(dirname "${BASH_SOURCE}")
|
||||
echo "Updating formatting"
|
||||
|
||||
gofmt -w -s $(find . -type f -name "*.go" -not -path "./vendor/*" -not -path "./pkg/generated/*" -not -name "zz_generated*")
|
||||
|
||||
command -v goimports > /dev/null || go get golang.org/x/tools/cmd/goimports
|
||||
goimports -w -d $(find . -type f -name "*.go" -not -path "./vendor/*" -not -path "./pkg/generated/*" -not -name "zz_generated*")
|
||||
|
||||
echo "Success!"
|
||||
|
||||
@@ -26,6 +26,7 @@ fi
|
||||
echo "Success!"
|
||||
|
||||
echo "Verifying goimports"
|
||||
command -v goimports > /dev/null || go get golang.org/x/tools/cmd/goimports
|
||||
goimports -l $(find . -type f -name "*.go" -not -path "./vendor/*" -not -path "./pkg/generated/*" -not -name "zz_generated*")
|
||||
echo "Success!"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user