22 lines
345 B
Bash
Executable File
22 lines
345 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
PACKAGES="$(go list ./...)"
|
|
|
|
file bin/*
|
|
|
|
if ! command -v golangci-lint; then
|
|
echo Skipping validation: no golangci-lint available
|
|
exit
|
|
fi
|
|
|
|
echo Running validation
|
|
|
|
echo Running: golangci-lint
|
|
golangci-lint run --timeout 10m
|
|
|
|
echo Running: go fmt
|
|
test -z "$(go fmt ${PACKAGES} | tee /dev/stderr)"
|