Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github/workflows: work around golang/go#51629
Updates #4194 Signed-off-by: David Anderson <danderson@tailscale.com>
- Loading branch information
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/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. | ||
|
||
find . -name '*.go' | xargs grep -l go:generate | xargs -n1 dirname | sort -u | while read dir; do | ||
if ! grep cmd/stringer $dir/*.go; then | ||
set -x | ||
go generate -tags=hermetic $dir | ||
set +x | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters