forge/Makefile

80 lines
1.5 KiB
Makefile

VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
all: install
@echo make restart # remove the repos.pb file
@echo make private # only the private ones
@echo make mine # just show my repos
@echo make pull # run git pull on every repo
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: goimports vet
GO111MODULE=off go install \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
goimports:
reset
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
redomod-all:
forge --do-RedoGoMod
redomod-erase:
forge --do-RedoGoMod --do-erase
private: install
forge --find-private
fix: install
forge --fix --find-all
all: install
forge --find-all
git-reset: install
forge --do-git-reset --find-all
readonly: install
forge --do-list --find-readonly
config: install
forge --config
scan: install
forge --do-scan
pull: install
forge --do-git-pull
mine: install
forge --find-mine
gui: install
forge --do-gui
patches: install
forge --do-patches
patches-localhost: install
forge --do-patches --url "http://localhost:2233/"
patches-list: install
forge --list-patches --url "http://localhost:2233/"
restart:
reset
rm ~/go/src/repos.pb
make config