2020-01-17 16:10:02 +00:00
|
|
|
cmd := "bash"
|
|
|
|
msg := ""
|
2020-01-25 02:56:09 +00:00
|
|
|
IMAGE_NAME := actions_hugo_dev:latest
|
|
|
|
NODE_VERSION := $(shell cat ./.nvmrc)
|
|
|
|
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION)
|
2020-01-25 03:42:32 +00:00
|
|
|
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME)
|
2020-03-27 10:07:48 +00:00
|
|
|
DOCKER_RUN_CI := docker run --rm -v ${PWD}:/repo $(IMAGE_NAME)
|
2020-01-17 16:10:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
|
|
|
$(DOCKER_BUILD)
|
|
|
|
|
|
|
|
.PHONY: run
|
|
|
|
run:
|
|
|
|
$(DOCKER_RUN) $(cmd)
|
|
|
|
|
2020-03-27 10:07:48 +00:00
|
|
|
.PHONY: cirun
|
|
|
|
cirun:
|
|
|
|
$(DOCKER_RUN_CI) $(cmd)
|
|
|
|
|
2020-01-17 16:10:02 +00:00
|
|
|
.PHONY: test
|
|
|
|
test:
|
|
|
|
$(DOCKER_RUN) npm test
|
|
|
|
|
2020-03-27 10:07:48 +00:00
|
|
|
.PHONY: all
|
|
|
|
all:
|
|
|
|
$(DOCKER_RUN) npm run all
|
|
|
|
|
|
|
|
.PHONY: ciall
|
|
|
|
ciall:
|
|
|
|
$(DOCKER_RUN_CI) npm run all
|