-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 972 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 972 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
28
29
30
31
32
33
34
35
.PHONY: build clean deploy gomodgen
buildForAWS: gomodgen
export GO111MODULE=on
env GOOS=linux go build -ldflags="-s -w" -o bin/fetch fetch/fetch.go
env GOOS=linux go build -ldflags="-s -w" -o bin/database database/database.go
buildForOSX: gomodgen
export GO111MODULE=on
env GOOS=darwin go build -ldflags="-s -w" -o bin/fetch fetch/fetch.go
env GOOS=darwin go build -ldflags="-s -w" -o bin/database database/database.go
buildForWin:
set GO111MODULE=on
set GOOS=windows go build -ldflags="-s -w" -o bin\fetch fetch\fetch.go
set GOOS=windows go build -ldflags="-s -w" -o bin\database database\database.go
clean:
rm -rf ./bin ./vendor Gopkg.lock
cleanWin:
del /s /q bin\*.*
test: clean buildForOSX
go test -covermode count -coverprofile cover.out ./...
testWin: cleanWin buildForWin
go test -covermode count -coverprofile cover.out ./...
deploy: clean buildForAWS
sls deploy --verbose --config serverless.yml
gomodgen:
chmod u+x gomod.sh
./gomod.sh