-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (30 loc) · 960 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
37
38
39
40
41
42
43
include .env
export
all: build-docker-update build-dev start
build-docker-update:
docker-compose pull
docker-compose build
build-dev:
bin/exec dep ensure
build-prod:
docker build -t golang-docker-bootstrap -f docker/prod/Dockerfile --build-arg PACKAGE_NAME .
@echo "\nDone. usage : docker run --rm golang-docker-bootstrap"
start:
docker-compose up -d --force-recreate
logs:
docker-compose logs -f
stop:
docker-compose stop
clean: stop
docker-compose down -v --remove-orphans || true
restart: clean start logs
test-cs:
@[ -z `docker-compose run --rm cli gofmt -s -l cmd internal` ] || (docker-compose run --rm cli gofmt -s -d -e cmd internal && false)
@bin/exec golint -set_exit_status ${PACKAGE_NAME}/cmd/...
@bin/exec golint -set_exit_status ${PACKAGE_NAME}/internal/...
@echo "cs ok!"
fix-cs:
bin/exec gofmt -s -l -w cmd internal
bin/exec golint ${PACKAGE_NAME}/cmd/...
bin/exec golint ${PACKAGE_NAME}/internal/...
test: test-cs