go-clone/Makefile

80 lines
1.8 KiB
Makefile
Raw Normal View History

2024-03-07 16:45:49 -06:00
VERSION = $(shell git describe --tags)
2024-11-15 10:52:00 -06:00
BUILDTIME = $(shell date +%Y.%m.%d)
2024-03-07 16:45:49 -06:00
2024-03-07 00:50:58 -06:00
run: build
./go-clone --version
2024-03-09 16:49:27 -06:00
2024-03-07 00:50:58 -06:00
vet:
@GO111MODULE=off go vet
@echo this go library package builds okay
no-gui: build
./go-clone --no-gui
build:
2024-12-01 10:42:32 -06:00
reset
GO111MODULE=off go build -v \
2024-11-15 18:09:39 -06:00
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
2024-03-07 00:50:58 -06:00
2024-12-02 11:22:24 -06:00
build-darwin:
GOOS=darwin GOARCH=amd64 GO111MODULE=off go build -v -o go-clone-darwin \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
build-windows:
GOOS=windows GOARCH=amd64 GO111MODULE=off go build -v go-clone.exe \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
2024-03-07 00:50:58 -06:00
install:
2024-11-16 00:07:22 -06:00
GO111MODULE=off go install \
2024-11-15 18:09:39 -06:00
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
2024-03-07 00:50:58 -06:00
goimports:
goimports -w *.go
2024-11-16 00:07:22 -06:00
# // to globally reset paths:
# // gofmt -w -r "go.wit.com/gui -> go.wit.com/gui/gui" .
2024-03-07 00:50:58 -06:00
redomod:
rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy
go mod edit -go=1.20
2024-03-07 00:50:58 -06:00
reset:
# clear your terminal
reset
gui-gocui: build
2024-03-07 00:50:58 -06:00
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
2024-12-01 10:42:32 -06:00
test-build: build
2024-12-01 12:51:38 -06:00
./go-clone --build go.wit.com/apps/guireleaser
2024-12-01 10:42:32 -06:00
2024-12-01 22:21:34 -06:00
test-install: build
./go-clone --install go.wit.com/apps/guireleaser
debian:
go-deb --no-gui --repo go.wit.com/apps/go-clone
2024-11-08 06:45:25 -06:00
pull: build
./go-clone --dry-run --pull
pullreal: build
./go-clone --pull
fetch: build
./go-clone --dry-run --fetch
2024-11-15 18:09:39 -06:00
modernc: build
./go-clone --no-work --recursive modernc.org/sqlite