blob: 54dd934c7de0f639054044125b1d96504d6b2f03 (
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
|
VERSION = $(shell git describe --tags)
GUIVERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
all: build
build: goimports
PKG_CONFIG_PATH=/opt/libgit2/ GO111MODULE=off go build -v -x \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
ldd going2git
LD_LIBRARY_PATH=/opt/libgit2 ./going2git --refs --repo .
run:
LD_LIBRARY_PATH=/opt/libgit2 ./going2git --refs --repo .
build-libgit2-prep:
cd /opt/ && git clone https://github.com/libgit2/libgit2.git
apt build-dep libgit2
build-libgit2:
cd /opt/libgit2/ && cmake .
cd /opt/libgit2/ && cmake --build .
vet:
GO111MODULE=off go vet
goimports:
goimports -w *.go
# // to globally reset paths:
# // gofmt -w -r '"go.wit.com/gui/gadgets" -> "go.wit.com/lib/gadgets"' *.go
install: goimports
GO111MODULE=off go install \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
clean:
rm -f go.*
rm -f going2git
-go-mod-clean --purge
|