Track CaSILE refactoring of init process

parent 6d7ff8de
......@@ -8,6 +8,7 @@ variables:
MAKEFLAGS: --output-sync=target
before_script:
- make init
- test -n "${CI_COMMIT_TAG}" || make update_toolkits
after_script:
- make debug
cache:
......
......@@ -53,35 +53,22 @@ SILE = /home/caleb/projects/sile/sile
$(call prepend,SILEPATH,/home/caleb/projects/sile/ )
endif
# 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
# CaSILE only includes actual tags, for VC output we want fancy branch names treated as if tagged
ALLTAGS := $(strip $(CI_COMMIT_TAG) $(shell git tag --points-at HEAD | xargs echo) $(and $(findstring /,$(BRANCH)),$(BRANCH)))
# If this commit is tagged or an a special branch, run special rules for it
ALLTAGS := $(strip $(shell git tag --points-at HEAD | xargs echo) $(and $(findstring /,$(BRANCH)),$(BRANCH)))
ifneq ($(ALLTAGS),)
DIFF = false
# Use first segment of tags as target names (sort is to deduplicate)
TARGETS = $(sort $(subst /,,$(dir $(ALLTAGS))))
# Use last segment of tag names as formats
FORMATS = $(sort $(notdir $(ALLTAGS)))
TAGNAME = $(firstword $(sort $(notdir $(ALLTAGS))))
FORMATS := $(sort $(notdir $(ALLTAGS)))
TAGNAME := $(firstword $(FORMATS))
# Else not directly on any tags
else
# If not on a tagged release, don't stick with pinned toolkit versions
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))
......@@ -162,7 +149,7 @@ $(UPDATATAGTARGETS): update_%_tags:
git tag $$tag
done
init: init_avadanlik
init_toolkits: init_avadanlik
.PHONY: init_avadanlik
init_avadanlik: time_warp_avadanlik $(AVADANLIKDIR)/yarn.lock $(OUTPUTDIR)
......@@ -176,12 +163,12 @@ update_toolkits: update_avadanlik
update_avadanlik: init_avadanlik
git submodule update --init --remote -- $(AVADANLIKDIR)
$(call time_warp,$(AVADANLIKDIR))
cd $(AVADANLIKDIR) && yarn upgrade
cd $(AVADANLIKDIR) && yarn install
time_warp: time_warp_avadanlik
.PHONY: time_warp_avadanlik
time_warp_avadanlik:
time_warp_avadanlik: init_avadanlik
$(call time_warp,$(AVADANLIKDIR))
$(OUTPUTDIR):
......
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