-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
41 lines (34 loc) · 815 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
#!make
.DEFAULT_GOAL := build
ifndef REGISTRY
override REGISTRY = halkeye
endif
NAME := incrementals-publisher
VERSION := latest
NAME_VERSION := $(NAME):$(VERSION)
TAGNAME := $(REGISTRY)/$(NAME_VERSION)
.PHONY: build
build: ## Build docker image
docker build -t $(TAGNAME) .
.PHONY: push
push: ## push to docker hub
docker push $(TAGNAME)
.PHONY: push
kill: ## kill the running process
docker kill $(NAME)
.SHELL := /bin/bash
.PHONY: run
run: ## run the docker hub
docker run \
-it \
--rm \
-p 3000:3000 \
--name $(NAME) \
$(TAGNAME)
.PHONY: test
test: ## run tests outside of docker
[ -e node_modules ] || npm install
npm run test
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'