-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (26 loc) · 805 Bytes
/
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
.PHONY: build check clean deploy
GOBUILD=env GOOS=linux go build -ldflags="-s -w" -o
help:
@echo "You can perform the following:"
@echo ""
@echo " build Build the Go code into ./bin"
@echo " check Format, lint, vet, and test Go code"
@echo " clean Remove the bin folder"
@echo " deploy Clean, build, and then deploy to AWS"
@echo ""
build: clean
export GO111MODULE=on
$(GOBUILD) bin/addtodo src/handlers/addtodo/main.go
$(GOBUILD) bin/listtodos src/handlers/listtodos/main.go
$(GOBUILD) bin/completetodo src/handlers/completetodo/main.go
$(GOBUILD) bin/deletetodo src/handlers/deletetodo/main.go
check:
@echo 'Formatting, linting, vetting, and testing Go code.'
go fmt ./...
golint ./...
go vet ./...
go test ./...
clean:
rm -rf ./bin
deploy: build
sls deploy --verbose