autodoc/Makefile

28 lines
611 B
Makefile
Raw Permalink Normal View History

image_tag = ldericher/autodoc
docker_build = docker build
docker_run = docker run --rm -it
2024-01-08 21:46:08 +00:00
examples_flags = -v "$(shell pwd)/examples:/docs" -u "$(shell id -u):$(shell id -g)"
.PHONY: default
default:
2024-01-08 21:40:36 +00:00
$(info use other targets: image build watch shell clean)
.PHONY: image
image:
$(docker_build) --tag $(image_tag) ./
.PHONY: build
build: image
$(docker_run) $(examples_flags) $(image_tag) -b
.PHONY: watch
watch: image
$(docker_run) $(examples_flags) $(image_tag)
2024-01-08 21:40:36 +00:00
.PHONY: shell
shell: image
$(docker_run) $(examples_flags) --entrypoint ash $(image_tag)
.PHONY: clean
clean:
git clean -xdf ./examples