refactor(make): split Makefile into sub-tasks files
This commit is contained in:
parent
b525f75055
commit
1ebd4cbd4f
4 changed files with 43 additions and 28 deletions
33
Makefile
33
Makefile
|
@ -70,17 +70,13 @@ all: help
|
||||||
## Install prerequisites
|
## Install prerequisites
|
||||||
##
|
##
|
||||||
|
|
||||||
prepare: prepare-slides prepare-docs ## install prerequisites
|
prepare: prepare-slides
|
||||||
|
|
||||||
prepare-slides: ## install prerequisites for PDF slides only
|
prepare-slides: ## install prerequisites for PDF slides only
|
||||||
npm install
|
npm install
|
||||||
npm rebuild node-sass
|
npm rebuild node-sass
|
||||||
npx browserslist@latest --update-db
|
npx browserslist@latest --update-db
|
||||||
|
.PHONY: prepare prepare-slides
|
||||||
prepare-docs: ## install prerequisites for static docs site only
|
|
||||||
pipenv install
|
|
||||||
|
|
||||||
.PHONY: prepare prepare-slides prepare-docs
|
|
||||||
|
|
||||||
images: $(DOCS_IMAGES_SVG) $(DOCS_IMAGES_PNG) ## build images
|
images: $(DOCS_IMAGES_SVG) $(DOCS_IMAGES_PNG) ## build images
|
||||||
@echo "Source:"
|
@echo "Source:"
|
||||||
|
@ -273,26 +269,7 @@ clean-docs:
|
||||||
|
|
||||||
.PHONY: clean clean-slides clean-docs
|
.PHONY: clean clean-slides clean-docs
|
||||||
|
|
||||||
##
|
include tasks/docs.mk
|
||||||
## Utilities
|
include tasks/docker.mk
|
||||||
##
|
include tasks/utils.mk
|
||||||
|
|
||||||
fixme:
|
|
||||||
@egrep --color -rni '(fixme)' $(DOCS_DIR) $(SLIDES_DIR)
|
|
||||||
|
|
||||||
.PHONY: fixme
|
|
||||||
|
|
||||||
docker-build: ## build docker image
|
|
||||||
docker build \
|
|
||||||
--file docker/Dockerfile \
|
|
||||||
--tag glenux/docmachine:$(BUILD_VERSION) \
|
|
||||||
.
|
|
||||||
docker tag \
|
|
||||||
glenux/docmachine:$(BUILD_VERSION) \
|
|
||||||
glenux/docmachine:latest
|
|
||||||
|
|
||||||
docker-push: ## push docker image
|
|
||||||
env docker push glenux/docmachine:latest
|
|
||||||
|
|
||||||
docker-pull: ## download docker image
|
|
||||||
env docker pull glenux/docmachine:latest
|
|
||||||
|
|
16
tasks/docker.mk
Normal file
16
tasks/docker.mk
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# vim: set ft=make :
|
||||||
|
|
||||||
|
docker-build: ## build docker image
|
||||||
|
docker build \
|
||||||
|
--file docker/Dockerfile \
|
||||||
|
--tag glenux/docmachine:$(BUILD_VERSION) \
|
||||||
|
.
|
||||||
|
docker tag \
|
||||||
|
glenux/docmachine:$(BUILD_VERSION) \
|
||||||
|
glenux/docmachine:latest
|
||||||
|
|
||||||
|
docker-push: ## push docker image
|
||||||
|
env docker push glenux/docmachine:latest
|
||||||
|
|
||||||
|
docker-pull: ## download docker image
|
||||||
|
env docker pull glenux/docmachine:latest
|
12
tasks/docs.mk
Normal file
12
tasks/docs.mk
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# vim: set ft=make :
|
||||||
|
|
||||||
|
prepare: prepare-docs ## install prerequisites
|
||||||
|
|
||||||
|
prepare-docs: ## install prerequisites for static docs site only
|
||||||
|
pipenv install
|
||||||
|
|
||||||
|
sync-docs-internal:
|
||||||
|
@>&2 echo "ERROR: not implemented"
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
.PHONY: prepare-docs
|
10
tasks/utils.mk
Normal file
10
tasks/utils.mk
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# vim: set ft=make :
|
||||||
|
|
||||||
|
##
|
||||||
|
## Utilities
|
||||||
|
##
|
||||||
|
|
||||||
|
fixme:
|
||||||
|
@egrep --color -rni '(fixme)' $(DOCS_DIR) $(SLIDES_DIR)
|
||||||
|
|
||||||
|
.PHONY: fixme
|
Loading…
Reference in a new issue