diff options
| author | Jeff Carr <[email protected]> | 2025-10-07 18:33:10 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-07 18:33:10 -0500 |
| commit | 0f79b1c6fe6b61cd033a3182b8ce1fef59fa3ba6 (patch) | |
| tree | b8b982a1273ff924e647bfe29cfdf92af4f243c1 | |
| parent | 67fbce95b2a4f5c0b085e68ce36dc8d42d0f250c (diff) | |
| -rw-r--r-- | Makefile | 10 | ||||
| -rw-r--r-- | generate.go | 14 |
2 files changed, 23 insertions, 1 deletions
@@ -1,8 +1,16 @@ # git remote add github [email protected]:wit-go/gui-debugger.git -all: auto.pb.go goimports vet +all: generate goimports vet @echo common init code for common packages +generate: clean + go mod init + go mod tidy + go generate + +go-generate: + rm -f *.pb.go *.patch + goimports: goimports -w *.go diff --git a/generate.go b/generate.go new file mode 100644 index 0000000..63d9ce7 --- /dev/null +++ b/generate.go @@ -0,0 +1,14 @@ +package prep + +// NOTE: it would be helpful if go.mod doesn't exist, that go generate +// would automatically run go mod init and go mod tidy +// and allow directives to 'go get go.wit.com/apps/autogenpb' +// then this process could be fully automated +// +//go:generate make go-generate +// # go:generate go get go.wit.com/apps/autogenpb # can't do this here since this repo is a GO "primitive" library (no deps) +// # go:generate go install -v go.wit.com/apps/autogenpb +//go:generate autogenpb --proto auto.proto +// # go:generate go get golang.org/x/tools # repo seems broken at this time (?) +// # go:generate go install -v golang.org/x/tools/cmd/goimports +//go:generate bash -c "goimports -w *.go" |
