mirror of
https://github.com/rancher/os.git
synced 2025-09-03 15:54:24 +00:00
Refactor build
This commit is contained in:
21
scripts/validate
Executable file
21
scripts/validate
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd $(dirname $0)/..
|
||||
|
||||
echo Running validation
|
||||
|
||||
PACKAGES="$(go list ./...)"
|
||||
|
||||
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
|
||||
|
||||
echo Running: go fmt
|
||||
test -z "$(go fmt ${PACKAGES} | tee /dev/stderr)"
|
Reference in New Issue
Block a user