Enable live sync to output dir for CI runs

parent 9479ea11
......@@ -116,12 +116,19 @@ ifdef FORMATS_$(TAGNAME)
FORMATS := $(FORMATS_$(TAGNAME))
endif
LIVESYNC = false
# Setup target dependencies to mimic stages of a CI pipeline
ifeq ($(MAKECMDGOALS),ci)
LIVESYNC = true
sync_pre: init debug
pdfs renderings promotionals: sync_pre
endif
ifneq ($(CI),)
LIVESYNC = true
endif
debug: debug_avadanlik
.PHONY: debug_avadanlik
......@@ -220,6 +227,11 @@ sync_post: | $(require_pubdir) $(require_outputdir)
-name "$(PROJECT)*" \
-execdir rsync -ct {} $(OUTPUTDIR)/ \;)
define addtopub ?=
$(DRAFT) && rm -f $(PUBDIR)/$@ || ln -f $@ $(PUBDIR)/$@
$(and $(LIVESYNC),$(OUTPUTDIR),$(foreach TARGET,$(call parse_bookid,$@),install -Dt $(OUTPUTDIR)/$(or $(strip $(filter-out $(PROJECT),$(TARGET))),$(OUTPATH)) $@))
endef
.PHONY: website
website:
curl \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment