summaryrefslogtreecommitdiff
path: root/Makefile
blob: 5e380b0ad3f3dd92f5cc8ee2a057407f06ca74b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)

run: build
	./go-clone --version

vet:
	@GO111MODULE=off go vet
	@echo this go library package builds okay

no-gui: build
	./go-clone --no-gui

build:
	reset
	GO111MODULE=off go build -v \
		-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 -> go.wit.com/gui/gui" .

redomod:
	rm -f go.*
	GO111MODULE= go mod init
	GO111MODULE= go mod tidy
	go mod edit -go=1.20

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

test-build: build
	./go-clone --build go.wit.com/apps/guireleaser

test-install: build
	./go-clone --install go.wit.com/apps/guireleaser


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

modernc: build
	./go-clone --no-work --recursive modernc.org/sqlite