github.com/grafana/synthetic-monitoring-agent@v0.64.2/scripts/enforce-clean (about) 1 #!/bin/sh 2 # 3 # This script verifies that files that might change after some updates 4 # (e.g. upgrading a dependency) DO NOT contain changes. 5 # 6 # Typical usage is calling this script after some continuous integration 7 # step that could produce such changes. 8 # 9 # If any unwanted changes are detected, the exit status will be 1, 0 10 # otherwise. 11 12 set -e 13 14 report_changes() { 15 echo "E: $1 contains changes. Stop." 16 exit 1 17 } 18 19 test -n "$(git status --porcelain -- go.sum)" && report_changes go.sum 20 21 exit 0