67 lines
1.2 KiB
Makefile
67 lines
1.2 KiB
Makefile
VERSION = $(shell git describe --tags)
|
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
|
|
|
all: goimports vet install
|
|
forge
|
|
|
|
vet:
|
|
@GO111MODULE=off go vet
|
|
@echo this go binary package builds okay
|
|
|
|
verbose:
|
|
GO111MODULE=off go build -v -x \
|
|
-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
|
|
@# // to globally reset paths:
|
|
@# // gofmt -w -r '"go.wit.com/gui/gadgets" -> "go.wit.com/lib/gadgets"' *.go
|
|
|
|
gocui: install
|
|
forge --gui gocui
|
|
|
|
check-git-clean:
|
|
@git diff-index --quiet HEAD -- || (echo "Git repository is dirty, please commit your changes first"; exit 1)
|
|
|
|
redomod:
|
|
rm -f go.*
|
|
GO111MODULE= go mod init
|
|
GO111MODULE= go mod tidy
|
|
|
|
redomod-all:
|
|
forge --do-RedoGoMod
|
|
|
|
redomod-erase:
|
|
forge --do-RedoGoMod --do-erase
|
|
|
|
list: install
|
|
reset
|
|
forge --do-list
|
|
|
|
private: install
|
|
reset
|
|
forge --find-private
|
|
|
|
list-fix: install
|
|
reset
|
|
forge --do-list --do-fix
|
|
|
|
list-readonly: install
|
|
reset
|
|
forge --do-list --find-readonly
|
|
|
|
list-config: install
|
|
forge --config
|
|
|
|
scan: install
|
|
reset
|
|
forge --do-scan
|
|
|
|
|
|
mine: install
|
|
forge --find-mine
|