-
Notifications
You must be signed in to change notification settings - Fork 59
/
Makefile
36 lines (26 loc) · 739 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
32
33
34
35
36
GOCMD = go
GOBUILD = $(GOCMD) build
GOINSTALL = $(GOCMD) install
GOTEST = $(GOCMD) test
BINARY_NAME = goadmin
CLI = adm
all: serve
serve:
$(GOCMD) run .
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o ./build/$(BINARY_NAME) -v ./
generate:
$(GOINSTALL) github.com/GoAdminGroup/go-admin/adm
$(CLI) generate -c adm_config.ini
test: black-box-test user-acceptance-test
black-box-test: ready-for-data
$(GOTEST) -v -test.run=TestExampleBlackBox
make clean
user-acceptance-test: ready-for-data
$(GOTEST) -v -test.run=TestExampleUserAcceptance
make clean
ready-for-data:
cp admin.db admin_test.db
clean:
rm admin_test.db
.PHONY: all serve build generate test black-box-test user-acceptance-test ready-for-data clean