This repository has been archived by the owner on Jul 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
68 lines (60 loc) · 3.14 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
65
66
67
68
.PHONY: build
build:
mkdir bin || echo bin already exists.....
@echo Building analytics.....
@GO111MODULE=on GOOS=linux CGO_ENABLED=0 go build -v -a -installsuffix cgo -o ./bin/analytics ./analytics/cmd/main.go >/dev/null && echo Building organization....; \
GO111MODULE=on GOOS=linux CGO_ENABLED=0 go build -v -a -installsuffix cgo -o ./bin/organization ./organization/cmd/main.go >/dev/null && echo Building coupons.....; \
GO111MODULE=on GOOS=linux CGO_ENABLED=0 go build -v -a -installsuffix cgo -o ./bin/coupons ./coupons/cmd/main.go >/dev/null && echo Building events....; \
GO111MODULE=on GOOS=linux CGO_ENABLED=0 go build -v -a -installsuffix cgo -o ./bin/events ./events/cmd/main.go >/dev/null && echo Building exporter....; \
GO111MODULE=on GOOS=linux CGO_ENABLED=0 go build -v -a -installsuffix cgo -o ./bin/exporter ./exporter/cmd/main.go >/dev/null && echo Buildding guests...; \
GO111MODULE=on GOOS=linux CGO_ENABLED=0 go build -v -a -installsuffix cgo -o ./bin/guests ./guests/cmd/main.go >/dev/null && echo Building simple_projection...; \
GO111MODULE=on GOOS=linux CGO_ENABLED=0 go build -v -a -installsuffix cgo -o ./bin/simple_projection ./simple_projection/cmd/main.go >/dev/null && Building participants....; \
GO111MODULE=on GOOS=linux CGO_ENABLED=0 go build -v -a -installsuffix cgo -o ./bin/participants ./participants/cmd/main.go >/dev/null && echo DONE!
.PHONY: docs
docs:
apidoc -i analytics \
-i organization \
-i events \
-i exporter \
-i guests \
-i participants \
-i simple_projection \
-i events \
-i coupons \
-o docs
.PHONY: lint
lint:
eslint ./docs/*/*.js --fix
.PHONY: test
test:
go test -v ./test/...
.PHONY: exec
exec:
./exec
.PHONY: dep
dep:
GO111MODULE=on
go mod vendor
go mod verify
.PHONY: img-build
img-build:
docker image build -f ./coupons/Dockerfile_performant -t angadsharma1016/hades-coupons .
docker image build -t angadsharma1016/hades-event -f ./events/Dockerfile_performant .
docker image build -t angadsharma1016/hades-participants -f ./participants/Dockerfile_performant .
docker image build -t angadsharma1016/hades-simple_projection -f ./simple_projection/Dockerfile_performant .
docker image build -t angadsharma1016/hades-exporter -f ./exporter/Dockerfile_performant .
docker image build -t angadsharma1016/hades-analytics -f ./analytics/Dockerfile_performant .
docker image build -t angadsharma1016/hades-guests -f ./guests/Dockerfile_performant .
docker image build -t angadsharma1016/hades-organization -f ./organization/Dockerfile_performant .
docker image build -t angadsharma1016/hades-nginx -f ./Web/Dockerfile .
.PHONY: img-push
img-push:
docker image push angadsharma1016/hades-coupons:latest
docker image push angadsharma1016/hades-event:latest
docker image push angadsharma1016/hades-participants:latest
docker image push angadsharma1016/hades-simple_projection:latest
docker image push angadsharma1016/hades-exporter:latest
docker image push angadsharma1016/hades-analytics:latest
docker image push angadsharma1016/hades-guests:latest
docker image push angadsharma1016/hades-organization:latest
docker image push angadsharma1016/hades-nginx:latest