-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
24 lines (24 loc) · 920 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
dev:
@go build && MASTOK_MODE=DEV ./mastok
newdev:
@go build && MASTOK_MODE=RESET_DEV ./mastok && MASTOK_MODE=DEV ./mastok
buildfront:
@go build && MASTOK_MODE=BUILD_FRONT ./mastok
deps:
@go get -t -u ./... && go mod tidy
cleantest:
@go clean -testcache
# see why "-p 1" here https://github.com/golang/go/issues/46959 + limiting the number
# of processes connected to the test DB
test:
@clear && MASTOK_MODE=TEST MASTOK_PROJECT_ROOT=`pwd` go test -p 1 ./...
testv:
@clear && MASTOK_MODE=TEST MASTOK_PROJECT_ROOT=`pwd` go test -p 1 -v ./...
testfmt:
@clear && MASTOK_MODE=TEST MASTOK_PROJECT_ROOT=`pwd` go test -p 1 -json ./... 2>&1 | tee /tmp/gotest.log | gotestfmt -hide all
dockerbuild:
@docker build -f docker/Dockerfile.build --progress=plain -t mastok:latest . && docker tag mastok ducksouplab/mastok
dockerpush:
@docker push ducksouplab/mastok:latest
dockerexec:
@docker run -t -i --rm mastok:latest sh