1
0
mirror of https://github.com/rancher/steve.git synced 2025-04-27 02:51:10 +00:00
steve/scripts/validate.sh
Michael Bolot b73cc57b20 Adding validate phase to the CI
Adds a validate phase to the CI which runs a linter. Also fixes
linter issues discovered during the initial run
2022-10-14 15:21:17 -05:00

13 lines
212 B
Bash

#!/bin/bash
set -e
golangci-lint run
go mod tidy
go mod verify
unclean=$(git status --porcelain --untracked-files=no)
if [ -n "$unclean" ]; then
echo "Encountered dirty repo!";
echo "$unclean";
exit 1;
fi