Skip to content

Commit

Permalink
fix: container build & shell make targets
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
  • Loading branch information
vladdoster committed Dec 16, 2022
1 parent 3af321e commit f8eb967
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
.EXPORT_ALL_VARIABLES:

ZSH := $(shell command -v zsh 2> /dev/null)
SHELL = $(ZSH)
SRC := share/{'git-process-output','rpm2cpio'}.zsh zinit{'','-additional','-autoload','-install','-side'}.zsh
DOC_SRC := $(foreach wrd,$(SRC),../$(wrd))
HAS_TTY := --tty
HAS_TTY := $(shell (( $${+GITHUB_ACTIONS} )) && echo '' || echo '--tty')



.PHONY: all clean container doc doc/container tags tags/emacs tags/vim test zwc

Expand All @@ -16,7 +19,7 @@ doc: clean ## Generate zinit documentation
cd doc; zsh -l -d -f -i -c "zsd -v --scomm --cignore '(\#*FUNCTION:[[:space:]][\+\@\-\:\_\_a-zA-Z0-9]*[\[]*|}[[:space:]]\#[[:space:]][\]]*|\#[[:space:]][\]]*)' $(DOC_SRC); make -C ./zsdoc pdf"

CONTAINER_NAME := zinit
CONTAINER_CMD := docker run -i --platform=linux/x86_64 --mount=source=$(CONTAINER_NAME)-volume,destination=/root
CONTAINER_CMD := docker run -i $(HAS_TTY) --platform=linux/x86_64 --mount=source=$(CONTAINER_NAME)-volume,destination=/root

container-build: ## build docker image
docker build --file=Dockerfile --platform=linux/x86_64 --tag=$(CONTAINER_NAME):latest .
Expand Down

0 comments on commit f8eb967

Please sign in to comment.