Skip to content

Commit a32aa62

Browse files
committed
Add Makefile
1 parent e70d6a5 commit a32aa62

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

kadai4/hioki-daichi/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
GOCMD=go
2+
GOBUILD=$(GOCMD) build
3+
GOCLEAN=$(GOCMD) clean
4+
GOTEST=$(GOCMD) test
5+
GOTOOL=$(GOCMD) tool
6+
GODOCCMD=godoc
7+
GODOCPORT=6060
8+
BINARY_NAME=omikuji-server
9+
10+
all: test build
11+
build:
12+
$(GOBUILD) -o $(BINARY_NAME) -v
13+
test:
14+
$(GOTEST) ./...
15+
cov:
16+
$(GOTEST) ./... -race -coverprofile=coverage/c.out -covermode=atomic
17+
$(GOTOOL) cover -html=coverage/c.out -o coverage/index.html
18+
open coverage/index.html
19+
clean:
20+
$(GOCLEAN)
21+
rm -f $(BINARY_NAME)
22+
doc:
23+
(sleep 1; open http://localhost:$(GODOCPORT)/pkg/github.com/gopherdojo/dojo3) &
24+
$(GODOCCMD) -http ":$(GODOCPORT)"

0 commit comments

Comments
 (0)