summaryrefslogtreecommitdiff
path: root/Makefile
blob: a482324063a0dbf348ef53f233e4a7d20c381348 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)

info: install
	# make dirty
	@echo "make restart   # remove the repos.pb file"
	@echo "make private   # only the private ones"
	@echo "make mine      # just show my repos"
	@echo "make all       # show all repos"
	@echo "make pull      # run git pull on every repo"
	@echo "make dirty     # CheckDirty()"
	@echo "make user      # git checkout user"
	@echo "make master    # git checkout master"
	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

fix: install
	forge --fix list --all

list-all: install
	forge list --all

git-reset: install
	forge --do-git-reset list --all

readonly: install
	forge --list list --readonly

config: install
	forge --config

scan: install
	forge do --scan

pull: install
	forge pull --mine

mine: install
	forge list --mine

all: install
	forge list --all

patches-make: install
	forge --patchset "from makefile 2"

localhost-patches: install
	forge --patchset "test-localhost" --url "http://localhost:2233/"

patches-list: install
	forge --list-patchset

patches-apply-230233: install
	forge --apply /tmp/2024.12.27.230233.submitted.pb

dirty: install
	forge dirty --all

restart:
	reset
	-rm ~/go/src/repos.pb
	make private

user: install
	forge user

devel: install
	forge devel --all

master: install
	forge master --all