kube-explorer/scripts/validate

21 lines
368 B
Bash
Executable File

#!/bin/bash
set -e
source $(dirname $0)/version
cd "$(dirname $0)/.."
if ! command -v golangci-lint; then
echo Running: go fmt
echo Skipping validation: no golangci-lint available test -z "$(go fmt ./... | tee /dev/stderr)"
exit
fi
echo Running: golangci-lint
golangci-lint run
echo Tidying up modules
go mod tidy
echo Verifying modules
go mod verify