14 lines
264 B
Bash
Executable File
14 lines
264 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#MISE description="Check if go.mod and go.sum are up-to-date"
|
|
|
|
set -euo pipefail
|
|
|
|
go mod tidy
|
|
STATUS=$(git status --porcelain go.mod go.sum)
|
|
if [ -n "$STATUS" ]; then
|
|
echo "Run \`go mod tidy\` and commit the changes."
|
|
exit 1
|
|
fi
|
|
|
|
exit 0
|