39 lines
767 B
Makefile
39 lines
767 B
Makefile
VERSION = $(shell git describe --tags)
|
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
|
|
|
run: build
|
|
|
|
test: build
|
|
@# make -C testautogen/ all
|
|
cd testautogen; pwd; ../autogenpb --proto test.proto
|
|
|
|
vet:
|
|
@GO111MODULE=off go vet
|
|
@echo this go library package builds okay
|
|
|
|
build:
|
|
GO111MODULE=off go build \
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
install:
|
|
GO111MODULE=off go install \
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
goimports:
|
|
goimports -w *.go
|
|
|
|
redomod:
|
|
rm -f go.*
|
|
GO111MODULE= go mod init
|
|
GO111MODULE= go mod tidy
|
|
go mod edit -go=1.20
|
|
|
|
reset:
|
|
# clear your terminal
|
|
reset
|
|
|
|
clean:
|
|
-rm -f go.*
|
|
-rm -f autogenpb
|
|
@#make -C testautogen/ clean
|