-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (32 loc) · 1 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
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help
docker-compose-build: ## Build containers by docker-compose.
ifeq ($(env), ci)
docker-compose -f docker-compose-ci.yml build
else
docker-compose -f docker-compose.yml build
endif
docker-compose-up: ## Run containers by docker-compose.
ifeq ($(env), ci)
docker-compose -f docker-compose-ci.yml up
else
docker-compose -f docker-compose.yml up
endif
docker-compose-up-d: ## Run containers in the background by docker-compose.
ifeq ($(env), ci)
docker-compose -f docker-compose-ci.yml up -d
else
docker-compose -f docker-compose.yml up -d
endif
docker-compose-pull: ## Pull images by docker-compose.
ifeq ($(env), ci)
docker-compose -f docker-compose-ci.yml pull
else
docker-compose -f docker-compose.yml pull
endif
lint: ## Run golint.
docker exec -it oilking golint ./...
test: ## Run tests.
docker exec -it oilking go test -v ./...