-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
48 lines (32 loc) · 1.25 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
SOURCES=vistecture.go
VERSION=2.5.0
.PHONY: all templates darwin linux frontend windows default
default: darwin
demo: frontend run-example
run-example:
go run vistecture.go --config example/demoproject/project.yml serve
all: frontend darwin_binary linux_binary windows_binary
windows: frontend windows_binary
linux: frontend linux_binary
darwin: frontend darwin_binary
frontend:
cd ./controller/web/template && npm install && npm run build
templates:
mkdir -p build-artifacts
zip -qr build-artifacts/templates.zip templates
darwin_binary: $(SOURCES) templates
GOOS=darwin go build -o build-artifacts/vistecture $(SOURCES)
linux_binary: $(SOURCES) templates
GOOS=linux go build -o build-artifacts/vistecture-linux $(SOURCES)
windows_binary: $(SOURCES) templates
GOOS=windows go build -o build-artifacts/vistecture.exe $(SOURCES)
docker:
docker build --no-cache -t aoepeople/vistecture .
docker tag aoepeople/vistecture:latest aoepeople/vistecture:$(VERSION)
docker-publish:
docker push aoepeople/vistecture:latest
docker push aoepeople/vistecture:$(VERSION)
dockerpublishexampleproject:
cd example && ./generate-docs-with-docker.sh
cd example && docker build --no-cache -t aoepeople/vistecture-example .
docker push aoepeople/vistecture-example:latest