File: codegeneration.sh

package info (click to toggle)
golang-github-digitalocean-go-qemu 0.0~git20250212.ee9b066-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 860 kB
  • sloc: sh: 34; makefile: 3
file content (14 lines) | stat: -rwxr-xr-x 373 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

# Perform code generation and verify that the git repository is still clean,
# meaning that any newly-generated code was added in this commit.
go generate ./...

GITSTATUS=$(git status --porcelain)
if [ -z "$GITSTATUS" ]; then
	exit 0
fi

echo -e "changes detected, run 'go generate ./...' and commit generated code in these files:\n"
echo "$GITSTATUS"
exit 1