-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (22 loc) · 983 Bytes
/
Makefile
File metadata and controls
27 lines (22 loc) · 983 Bytes
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
ifdef DOTENV
DOTENV_TARGET=dotenv
else
DOTENV_TARGET=./.env
endif
.PHONY: build clean
build: clean #test # generate_graphql test
export GO111MODULE=on
env GOOS=linux go build -ldflags="-s -w" -a -tags netgo -installsuffix netgo -o bin/auth/create/secret handlers/auth/create/secret/main.go
env GOOS=linux go build -ldflags="-s -w" -a -tags netgo -installsuffix netgo -o bin/auth/create/jwt handlers/auth/create/jwt/main.go
env GOOS=linux go build -ldflags="-s -w" -a -tags netgo -installsuffix netgo -o bin/auth/validate/jwt handlers/auth/validate/jwt/main.go
chmod +x bin/auth/create/secret
chmod +x bin/auth/create/jwt
chmod +x bin/auth/validate/jwt
zip -j bin/auth/create/secret.zip bin/auth/create/secret
zip -j bin/auth/create/jwt.zip bin/auth/create/jwt
zip -j bin/auth/validate/jwt.zip bin/auth/validate/jwt
clean:
-rm -rf ./bin
test: build
go test -race $$(go list ./... | grep -v /vendor/) -v -coverprofile=coverage.out
go tool cover -func=coverage.out