diff options
| -rw-r--r-- | Makefile | 12 | ||||
| -rw-r--r-- | generate.go | 15 |
2 files changed, 26 insertions, 1 deletions
@@ -3,10 +3,20 @@ VERSION = $(shell git describe --tags) BUILDTIME = $(shell date +%Y.%m.%d_%H%M) -all: proto install +all: generate vet install @#./gus --config /etc/gus/gus.text gus --me +generate: clean + go mod init + go mod tidy + go generate + +go-generate: + rm -f *.pb.go *.patch + +vet: + gocui: build ./gus --gui gocui --config /etc/gus/gus.text >/tmp/gocui.log 2>&1 diff --git a/generate.go b/generate.go new file mode 100644 index 0000000..cf2058d --- /dev/null +++ b/generate.go @@ -0,0 +1,15 @@ +package main + +// 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 event.proto +//go:generate autogenpb --proto portmap.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" |
