summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-08 19:45:48 -0600
committerJeff Carr <[email protected]>2025-01-08 19:45:48 -0600
commit3fe2fde185b950215008e67a50364ec741f2fd09 (patch)
tree25392d9c486a324afe61239d54b5e4395d3a3000 /Makefile
parent0a1eb821e9123f4e6793b410300803c610d4b804 (diff)
make a protofile for the app itself
that turns out to be a lot of fun!
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 20 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index b2d3693..89c133d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,37 @@
VERSION = $(shell git describe --tags)
-BUILDTIME = $(shell date +%Y.%m.%d)
+BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
-run: goimports vet install
+test: goimports build auto
+
+full: clean goimports auto vet install
vet:
@GO111MODULE=off go vet
@echo this go binary package should build okay
+cleanbuild:
+ rm -f auto.marshal.pb.go auto.sort.pb.go autogenpb
+
build:
GO111MODULE=off go build \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+bak:
+ mv -f autogenpb autogenpb.last
+
install:
GO111MODULE=off go install \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+auto.pb.go: auto.proto
+ ./autogenpb --proto auto.proto --package testfiles
+ rm -f auto.sort.pb.go auto.marshal.pb.go
+
+auto:
+ cd testfiles; rm -f go.* *.pb.go
+ cd testfiles; ../autogenpb --proto auto.proto --package yellow
+ cd testfiles; GO111MODULE=off go vet
+
goimports:
goimports -w *.go
@@ -25,8 +42,7 @@ redomod:
go mod edit -go=1.20
reset:
- # clear your terminal
- reset
+ -rm -f auto.sort.pb.go
clean:
-rm -f go.*