forge/Makefile

61 lines
1.3 KiB
Makefile

VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)
info: 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-mine # run git pull on my repos"
@echo "make dirty # CheckDirty()"
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: 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 >/tmp/forge.log 2>&1
private: install
forge list --private
pull-mine: install
forge pull --mine
mine: install
forge list --mine
patches-make: install
forge --patchset "from makefile 2"
patches-list-2233: install
forge --list-patchset --connect "http://go.wit.com:2233/"
patches-list: install
forge --list-patchset
patches-apply-230233: install
forge --apply /tmp/2024.12.27.230233.submitted.pb
dirty: install
forge dirty
restart:
reset
-rm ~/go/src/repos.pb
make private