summaryrefslogtreecommitdiff
path: root/Makefile
blob: 3a70645dd9d17ab78bffe71a2a058632800a3493 (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
.PHONY: build

VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d)

build:
	GO111MODULE=off go build \
		-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
	./xstartplacement

verbose:
	GO111MODULE=off go build -v -x \
		-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}"

# makes a .deb package
debian:
	rm -f ~/incoming/virtigo*deb
	go-deb --no-gui --repo go.wit.com/apps/virtigo

# autofixes your import headers in your golang files
goimports:
	goimports -w *.go

# remake the go.mod and go.sum files
redomod:
	rm -f go.*
	GO111MODULE= go mod init
	GO111MODULE= go mod tidy

clean:
	rm -f go.*
	rm -f virtigo*