Try to separate output dir from per target paths

parent a5848ce3
......@@ -64,14 +64,13 @@ BRANCH = $(CI_BUILD_REF_NAME)
endif
endif
# If this commit is tagged, run special rules for it
ALLTAGS := $(shell git tag --points-at HEAD | xargs echo)
# If this commit is tagged or an a special branch, run special rules for it
ALLTAGS := $(shell git tag --points-at HEAD | xargs echo) $(and $(findstring /,$(BRANCH)),$(BRANCH))
ifneq ($(ALLTAGS),)
# If we are on a tagged release, don't do pre-sync
undefine INPUTDIR
BRANCH = master
DIFF = false
# Use first segment of tags as target names (sort is to deduplicate)
......@@ -90,9 +89,6 @@ init: update_toolkits
# If we are not on the master branch, guess the parent and output to a directory
ifneq ($(BRANCH),master)
PARENT ?= $(shell git merge-base master $(BRANCH))
INPUTDIR := $(INPUTDIR)/$(BRANCH)
OUTPUTDIR := $(OUTPUTDIR)/$(BRANCH)
NEXTCLOUD := $(NEXTCLOUD)/$(BRANCH)
endif
# If the environment has information about a parent, override the calculated one
......@@ -104,6 +100,13 @@ endif
# End non-tagged
endif
# Assume OUTPATHS is always used in a foreach loop with TARGET variable set
ifeq ($(BRANCH),master)
OUTPATHS = $(TARGET) $(and $(TARGET),$(TAGNAME),$(TARGET)/$(TAGNAME))
else
OUTPATHS = $(BRANCH)
endif
# If there is a layout associated with a tag, only build that layout
ifdef LAYOUTS_$(TAGNAME)
LAYOUTS := $(LAYOUTS_$(TAGNAME))
......@@ -122,6 +125,8 @@ debug_avadanlik:
@echo AVADANLIKDIR: $(AVADANLIKDIR)
@echo BRANCH: $(BRANCH)
@echo NEXTCLOUD: $(NEXTCLOUD)
@echo TAGNAME: $(TAGNAME)
@echo OUTPATHS: $(OUTPATHS)
.avadanlik.lua:
cat <<- EOF > $@
......
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