File: check-code-generation-ran.sh

package info (click to toggle)
golang-github-zorkian-go-datadog-api 2.30.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,612 kB
  • sloc: makefile: 28; sh: 13
file content (15 lines) | stat: -rwxr-xr-x 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Make generate will always update datadog-accessors.go
cp datadog-accessors.go datadog-accessors.go.bak

# Regenerate code and compare results
make generate && cmp -s datadog-accessors.go.bak datadog-accessors.go
changed=$?

# Clean up after ourselves
rm datadog-accessors.go.bak

# See if contents have changed and error if they have
if [[ $changed != 0 ]] ; then
    echo "Did you run 'make generate' before committing?"
    exit 1
fi