-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (49 loc) · 2.15 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
#!bin/bash
#
# Makefile
# hzsunshx, 2015-02-11 13:17
#
go-src-project = github.com/yellyoshua/elections-app
src-ballot-main = ballot/ballot.go
src-suffrage-main = suffrage/suffrage.go
install:
go get -u -v ./...
go get github.com/vektra/mockery/v2/.../
# test:
# mockery --dir repository --all --output ./commons/mocks/repository/ --keeptree --inpackage
# go test -timeout 30s $(go-src-project)/modules/graphql
# go test -timeout 30s $(go-src-project)modules/authentication
# go test -timeout 30s $(go-src-project)/api
# go test -timeout 30s $(go-src-project)/utils
# go test -timeout 30s $(go-src-project)/middlewares
# go test -timeout 30s $(go-src-project)/handlers
# go test -timeout 30s $(go-src-project)/modules/storage
# go test -timeout 30s $(go-src-project)/repository
clean-dependencies:
go mod tidy
build:
make ballot-build
make suffrage-build
suffrage-tests:
echo "$(src-suffrage-main)"
ballot-tests:
echo "$(src-suffrage-main)"
ballot-build:
go build -a -o elections-ballot $(src-ballot-main)
suffrage-build:
go build -a -o elections-suffrage $(src-suffrage-main)
ballot-cross-build:
GOOS=windows GOARCH=386 go build -a -o elections-ballot-win32 $(src-ballot-main)
GOOS=linux GOARCH=386 go build -a -o elections-ballot-linux-386 $(src-ballot-main)
GOOS=linux GOARCH=amd64 go build -a -o elections-ballot-linux-amd64 $(src-ballot-main)
suffrage-cross-build:
GOOS=windows GOARCH=386 go build -a -o elections-suffrage-win32 $(src-suffrage-main)
GOOS=linux GOARCH=386 go build -a -o elections-suffrage-linux-386 $(src-suffrage-main)
GOOS=linux GOARCH=amd64 go build -a -o elections-suffrage-linux-amd64 $(src-suffrage-main)
cross-build:
GOOS=windows GOARCH=386 go build -a -o elections-suffrage-win32 $(src-suffrage-main)
GOOS=linux GOARCH=386 go build -a -o elections-suffrage-linux-386 $(src-suffrage-main)
GOOS=linux GOARCH=amd64 go build -a -o elections-suffrage-linux-amd64 $(src-suffrage-main)
GOOS=windows GOARCH=386 go build -a -o elections-ballot-win32 $(src-ballot-main)
GOOS=linux GOARCH=386 go build -a -o elections-ballot-linux-386 $(src-ballot-main)
GOOS=linux GOARCH=amd64 go build -a -o elections-ballot-linux-amd64 $(src-ballot-main)