webhook/scripts/validate-ci

25 lines
322 B
Bash
Executable File

#!/bin/bash
set -e
cd $(dirname $0)/..
echo Running go mod checks
echo Running: go generate
go generate ./...
echo Running: go mod tidy
go mod tidy
echo Running: go mod verify
go mod verify
source ./scripts/version
if [ -n "$DIRTY" ]; then
echo Git is dirty
git status
git --no-pager diff
exit 1
fi