autogenpb/Makefile

51 lines
1.1 KiB
Makefile
Raw Normal View History

2024-11-29 08:30:19 -06:00
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
2024-11-29 08:30:19 -06:00
test: goimports build auto
full: clean goimports auto vet install
2024-11-29 08:30:19 -06:00
vet:
@GO111MODULE=off go vet
2024-12-01 22:21:09 -06:00
@echo this go binary package should build okay
2024-11-29 08:30:19 -06:00
cleanbuild:
rm -f auto.marshal.pb.go auto.sort.pb.go autogenpb
2024-11-29 08:30:19 -06:00
build:
GO111MODULE=off go build \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
bak:
mv -f autogenpb autogenpb.last
2024-11-29 08:30:19 -06:00
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
2024-11-29 08:30:19 -06:00
goimports:
goimports -w *.go
redomod:
rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy
2024-11-29 21:49:11 -06:00
go mod edit -go=1.20
2024-11-29 08:30:19 -06:00
reset:
-rm -f auto.sort.pb.go
2024-11-29 08:30:19 -06:00
clean:
-rm -f go.*
2025-01-07 20:57:50 -06:00
-rm -f *.pb.go
-rm -f autogenpb