Try to setup output syncing

parent 8efb2d3d
......@@ -33,6 +33,20 @@ urlinfo := https://ccm.izmirprotestan.org/
-include $(CCMTOOLKITDIR)/makefile-$(LANGUAGE) $(CCMTOOLKITDIR)/makefile-$(LANGUAGE)-reversed
# CI runners need help getting the branch name because of funky checkouts
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
ifeq ($(BRANCH),HEAD)
ifeq ($(shell git rev-parse master),$(shell git rev-parse HEAD))
BRANCH = master
else
BRANCH = $(CI_BUILD_REF_NAME)
endif
endif
ifeq ($(BRANCH),master)
LIVESYNC = true
endif
# Work around GNU make defaulting to running the first rule defined
default: all
......@@ -142,3 +156,8 @@ endif # End export mode rules
parse_lesson = $(or $(filter $(LESSONS),$(subst -, ,$(basename $1))),)
parse_lessonfilter = $(or $(filter $(LESSONFILTERS),$(call unlocalize,$(subst -, ,$(basename $1)))),)
lang4 = $(shell echo -n $1-$${$${lang=$1}:u})
define addtopub ?=
$(DRAFT) && rm -f $(PUBDIR)/$@ || ln -f $@ $(PUBDIR)/$@
$(and $(LIVESYNC),$(OUTPUTDIR),$(DRAFT) || install -Dt $(OUTPUTDIR)/$(LANGUAGE)/$(PROJECT)/ $@)
endef
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