mirror of
https://gogs.blitter.com/RLabs/xs
synced 2024-08-14 10:26:42 +00:00
Version tags now reflect mod/vendor build setup.
Switched 'make lint' to use golangci-lint as gometalinter is deprecated. Signed-off-by: Russ Magee <rmagee@gmail.com>
This commit is contained in:
parent
2a6663ed3c
commit
ce5cfef6d5
4 changed files with 17 additions and 11 deletions
22
Makefile
22
Makefile
|
@ -1,22 +1,28 @@
|
||||||
.PHONY: lint vis clean common client server passwd subpkgs install uninstall reinstall
|
.PHONY: lint vis clean common client server passwd subpkgs install uninstall reinstall
|
||||||
|
|
||||||
#ifeq ($(MAKEOPTS),)
|
## Tag version of binaries with build info wrt.
|
||||||
MAKEOPTS = $(MAKEOPTS)
|
## GO111MODULE(=on) and vendor/ setup vs. $GOPATH pkg builds
|
||||||
#endif
|
############################################################
|
||||||
|
ifeq ($(shell go env GOMOD),)
|
||||||
GIT_COMMIT := $(shell git rev-list -1 HEAD)
|
MTAG=
|
||||||
VERSION := 0.8.12
|
else
|
||||||
|
MTAG="-m"
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(VENDOR),)
|
ifneq ($(VENDOR),)
|
||||||
GOBUILDOPTS :=-v -mod vendor
|
GOBUILDOPTS :=-v -mod vendor
|
||||||
VTAG = "-vendor"
|
VTAG = "-v"
|
||||||
else
|
else
|
||||||
GOBUILDOPTS=
|
GOBUILDOPTS=
|
||||||
VTAG =
|
VTAG =
|
||||||
endif
|
endif
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
GIT_COMMIT := $(shell git rev-list -1 HEAD)
|
||||||
|
VERSION := 0.8.12
|
||||||
|
|
||||||
#ifeq ($(BUILDOPTS),)
|
#ifeq ($(BUILDOPTS),)
|
||||||
BUILDOPTS :=$(BUILDOPTS)"$(GOBUILDOPTS) -ldflags \"-X main.version=$(VERSION)$(VTAG) -X main.gitCommit=$(GIT_COMMIT)\""
|
BUILDOPTS :=$(BUILDOPTS)"$(GOBUILDOPTS) -ldflags \"-X main.version=$(VERSION)$(MTAG)$(VTAG) -X main.gitCommit=$(GIT_COMMIT)\""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SUBPKGS = logger spinsult xsnet
|
SUBPKGS = logger spinsult xsnet
|
||||||
|
|
|
@ -15,4 +15,4 @@ vis:
|
||||||
../fixup-gv.sh xs.go && cat xs-vis.gv | dot -Tpng -oxs-vis-fixedup.png
|
../fixup-gv.sh xs.go && cat xs-vis.gv | dot -Tpng -oxs-vis-fixedup.png
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
-gometalinter --deadline=60s | sort
|
-golangci-lint run
|
||||||
|
|
|
@ -14,5 +14,5 @@ vis:
|
||||||
../fixup-gv.sh xsd.go && cat xsd-vis.gv | dot -Tpng -oxsd-vis-fixedup.png
|
../fixup-gv.sh xsd.go && cat xsd-vis.gv | dot -Tpng -oxsd-vis-fixedup.png
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
-gometalinter --deadline=60s | sort
|
-golangci-lint run
|
||||||
|
|
||||||
|
|
|
@ -13,4 +13,4 @@ vis:
|
||||||
go-callvis -format png -file xspasswd-vis -ignore $(EXTPKGS) -group pkg,type .
|
go-callvis -format png -file xspasswd-vis -ignore $(EXTPKGS) -group pkg,type .
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
-gometalinter --deadline=60s | sort
|
-golangci-lint run
|
||||||
|
|
Loading…
Reference in a new issue