-
Notifications
You must be signed in to change notification settings - Fork 63
/
Makefile
64 lines (48 loc) · 1.44 KB
/
Makefile
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
EXEC = ./example
VERSION = 0.2.2
run:
@cd example && go build && $(EXEC)
install-ui:
@cd example/ui && npm run install
build-ui:
@cd example/ui && npm run build
builder:
@make install-builder
@gotron-builder -g=example --win
install-builder:
@cd cmd/gotron-builder && go install
clean:
@-rm -r .gotron
@-rm -r .gotron-builder
################ test ################
test-ci:
@-rm -r .gotron .gotron-builder example/.gotron example/.gotron-builder
make install-builder
gotron-builder -g example -l --ia32
cd example && gotron-builder
gotron-builder -g example -a example/ui/build -w
gotron-builder -g example --out example -w --ia32
@make release
@make release-clean
test-clean-build:
@docker build -f test/Dockerfile .
################ release #############
# Create releasable executable of gotron-builder
release:
@-mkdir release
@-rm release/*
@go get ./...
@GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
go build -o ./release/gotron-builder-amd64-linux \
-ldflags="-X main.gotronBuilderVersion=$(VERSION)" \
-a cmd/gotron-builder/main.go
@GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 \
go build -o ./release/gotron-builder-amd64-darwin \
-ldflags="-X main.gotronBuilderVersion=$(VERSION)" \
-a cmd/gotron-builder/main.go
@GOOS=windows GOARCH=amd64 CGO_ENABLED=0 \
go build -o ./release/gotron-builder-amd64-win.exe \
-ldflags="-X main.gotronBuilderVersion=$(VERSION)" \
-a cmd/gotron-builder/main.go
release-clean:
@-rm -r release