refactor: makefile & tasks
This commit is contained in:
parent
39d701f946
commit
3cea2ba18d
6 changed files with 34 additions and 11 deletions
14
Makefile
14
Makefile
|
@ -111,11 +111,8 @@ watch: ## run development server
|
|||
pipenv run honcho start
|
||||
|
||||
serve: watch
|
||||
serve-docs: watch-docs
|
||||
|
||||
.PHONY: watch serve
|
||||
.PHONY: watch-docs serve-docs
|
||||
.PHONY: watch-docs-internal
|
||||
|
||||
##
|
||||
## Build final documents
|
||||
|
@ -126,13 +123,9 @@ serve-docs: watch-docs
|
|||
|
||||
build: build-pdf build-html ## build all documents as PDF and HTML files
|
||||
|
||||
build-pptx: build-slides-pptx ## build slides as PPTX files
|
||||
|
||||
build-pdf: build-docs-pdf build-slides-pdf ## build both docs and slides as PDF files
|
||||
|
||||
build-html: build-docs-html build-slides-html ## build both docs and slides as HTML files
|
||||
|
||||
build-docs: build-docs-pdf build-docs-html ## build only docs as PDF and HTML
|
||||
build-pptx: ## build both docs and slides as PPTX files
|
||||
build-html: ## build both docs and slides as HTML files
|
||||
build-pdf: ## build both docs and slides as PDF files
|
||||
|
||||
.PHONY: build
|
||||
|
||||
|
@ -162,4 +155,5 @@ include tasks/slides.mk
|
|||
include tasks/docker.mk
|
||||
include tasks/utils.mk
|
||||
include tasks/images.mk
|
||||
include tasks/shell.mk
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ else
|
|||
fi
|
||||
# set +x
|
||||
|
||||
if [ "$1" = "shell" ]; then
|
||||
if [ "$1" = "supershell" ]; then
|
||||
exec bash
|
||||
else
|
||||
exec gosu "$EXT_UID:$EXT_GID" make "$@"
|
||||
|
|
|
@ -4,6 +4,7 @@ docker-build: ## build docker image
|
|||
docker build \
|
||||
--file docker/Dockerfile \
|
||||
--tag glenux/docmachine:$(BUILD_VERSION) \
|
||||
--output type=docker \
|
||||
.
|
||||
docker tag \
|
||||
glenux/docmachine:$(BUILD_VERSION) \
|
||||
|
|
|
@ -58,3 +58,13 @@ watch-docs: ## run development server for static docs site
|
|||
.PHONY: watch-docs
|
||||
watch: watch-docs
|
||||
|
||||
|
||||
build-pdf: build-docs-pdf ## build docs as PDF files
|
||||
build-html: build-docs-html ## build docs as HTML files
|
||||
build-docs: build-docs-pdf build-docs-html ## build only docs as PDF and HTML
|
||||
|
||||
serve-docs: watch-docs
|
||||
|
||||
.PHONY: watch-docs serve-docs
|
||||
.PHONY: watch-docs-internal
|
||||
|
||||
|
|
9
tasks/shell.mk
Normal file
9
tasks/shell.mk
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
.PHONY: supershell
|
||||
supershell: shell
|
||||
|
||||
.PHONY: shell
|
||||
shell:
|
||||
@echo "Running shell..."
|
||||
@bash
|
||||
|
|
@ -104,3 +104,12 @@ watch-tocupdate-internal:
|
|||
$(MAKE) images ; \
|
||||
done
|
||||
|
||||
.PHONY: build-slides-pdf
|
||||
build-pdf: build-slides-pdf ## build slides as PDF files
|
||||
|
||||
.PHONY: build-slides-html
|
||||
build-html: build-slides-html ## build slides as HTML files
|
||||
|
||||
.PHONY: build-slides-pptx
|
||||
build-pptx: build-slides-pptx ## build slides as PPTX files
|
||||
|
||||
|
|
Loading…
Reference in a new issue