51 lines
1.1 KiB
Makefile
51 lines
1.1 KiB
Makefile
VERSION = $(shell git describe --tags)
|
|
BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
|
|
|
|
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
|
|
|
|
redomod:
|
|
rm -f go.*
|
|
GO111MODULE= go mod init
|
|
GO111MODULE= go mod tidy
|
|
go mod edit -go=1.20
|
|
|
|
reset:
|
|
-rm -f auto.sort.pb.go
|
|
|
|
clean:
|
|
-rm -f go.*
|
|
-rm -f *.pb.go
|
|
-rm -f autogenpb
|