go-clone/Makefile

74 lines
1.6 KiB
Makefile

VERSION = $(shell git describe --tags)
run: build
@#./go-clone --work github.com/rclone/rclone
@# ./go-clone --work go.wit.com/apps/basicwindow
./go-clone --version
# test using --no-work against ~/go/src
homeGoSrc: build
-rm ~/go/src/go.work*
go clean -cache -modcache
-rm -rf ../basicwindow/
./go-clone --no-work go.wit.com/apps/basicwindow
modernc: build
./go-clone --no-work --recursive modernc.org/sqlite
vet:
@GO111MODULE=off go vet
@echo this go library package builds okay
no-gui: build
./go-clone --no-gui
build:
GO111MODULE=off go build -v \
-ldflags "-X main.VERSION=${VERSION} -X gui.GUIVERSION=${VERSION}"
build-go-1.21:
@#GO111MODULE=off /usr/lib/go-1.21/bin/go build -v -ldflags "-X main.VERSION=${VERSION}"
@# GO111MODULE=off /usr/lib/go-1.21/bin/go build -v -ldflags "-X main.Version=${VERSION} -X gui.GUIVERSION=${VERSION}"
@# GO111MODULE=off go build -v -ldflags "-X main.GUIVERSION=${VERSION}"
install:
GO111MODULE="off" go install -v
goimports:
goimports -w *.go
redomod:
rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy
reset:
# clear your terminal
reset
gui-gocui: build
reset
./go-clone --gui gocui >/tmp/witgui.log.stderr 2>&1
nocui: reset build
./go-clone --gui nocui
clean:
-rm go-clone
# this will test the golang.org/x -> googlesource override
git-clone:
./go-clone --recursive --go-src --no-work go.wit.com/lib/daemons/virtigod
debian:
go-deb --no-gui --repo go.wit.com/apps/go-clone
pull: build
./go-clone --dry-run --pull
pullreal: build
./go-clone --pull
fetch: build
./go-clone --dry-run --fetch