-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (42 loc) · 1.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
PACKAGES = $(shell ./scripts/packages.sh)
APIGW_LOCAL_ENDPOINT = http://127.0.0.1:3000/
EXTERNAL_TOOLS = \
github.com/golang/dep/cmd/dep \
github.com/motemen/gobump \
github.com/Songmu/ghch/cmd/ghch
setup:
@for tool in $(EXTERNAL_TOOLS) ; do \
echo "Installing $$tool" ; \
go get $$tool; \
done
test-all: vet lint test
test:
./scripts/test.sh
vet:
go vet $(PACKAGES)
lint:
@if [ -z `which errcheck 2> /dev/null` ]; then \
go get -u github.com/golang/lint/golint; \
fi
echo $(PACKAGES) | xargs -n 1 golint -set_exit_status
errcheck:
@if [ -z `which errcheck 2> /dev/null` ]; then \
go get -u github.com/kisielk/errcheck; \
fi
echo $(PACKAGES) | xargs errcheck -ignoretests
release: setup bump build upload deploy tweet
bump: setup
./scripts/bumpup.sh
deploy: build
./scripts/deploy.sh
upload: bump
./scripts/upload.sh
build:
GOOS=linux GOARCH=amd64 go build -o main
tweet:
./scripts/tweet.sh
local: build
sam local start-api --env-vars env.json
post:
curl -X POST -d '{"owner": "toshi0607", "repo": "gig"}' $(APIGW_LOCAL_ENDPOINT)
.PHONY: test-all test vet lint setup bump upload build deploy release local tweet