mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-26 11:35:35 +00:00
2a412ac9ee
Incidentally, simplify the go generate CI workflow, by marking the dnsfallback update non-hermetic (so CI will skip it) rather than manually filter it out of `go list`. Updates #4194 Signed-off-by: David Anderson <danderson@tailscale.com>
19 lines
528 B
Bash
Executable File
19 lines
528 B
Bash
Executable File
#!/usr/bin/env sh
|
|
#
|
|
# This is a temporary hack to work around
|
|
# https://github.com/golang/go/issues/51629 , wherein the stringer
|
|
# generator doesn't work with generics.
|
|
#
|
|
# This script is the equivalent of `go generate ./...`, except that it
|
|
# only runs generate on packages that don't try to use stringer.
|
|
|
|
set -e
|
|
|
|
find . -name '*.go' | xargs grep -l go:generate | xargs -n1 dirname | sort -u | while read dir; do
|
|
if ! egrep "cmd/(stringer|cloner)" $dir/*.go; then
|
|
set -x
|
|
go generate -tags=hermetic $dir
|
|
set +x
|
|
fi
|
|
done
|