-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
35 lines (27 loc) · 977 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
PROJECT := ewc
APP := rfc-test-runner
NAME = $(PROJECT)-$(APP)
TERM_FLAGS ?= -ti
EXTRA_RUN_ARGS ?=
VERSION ?= $(shell git describe --tags --abbrev=0)
CANDIDATE ?= "dev"
CONTAINER_DASHBOARD ?= "ewc_rfc_test_runner"
CONTAINER_DEFAULT_RUN_FLAGS := \
--rm $(TERM_FLAGS) \
$(EXTRA_RUN_ARGS)
DOCKER_IMAGE := $(NAME)
.DEFAULT_GOAL := help
.PHONY: help
help:
@echo "------------------------------------------------------------------------"
@echo "EWC TEST RUNNER"
@echo "------------------------------------------------------------------------"
@grep -E '^[0-9a-zA-Z_/%\-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
run: ## Run locally for development purposes
docker run \
$(CONTAINER_DEFAULT_RUN_FLAGS) \
-p 3000:3000 \
--name "${CONTAINER_DASHBOARD}" \
$(DOCKER_IMAGE):dev
build: ## Builds the docker image
docker build -t $(DOCKER_IMAGE):dev -f resources/docker/Dockerfile .