Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Via Christus
avadanlık
Commits
f52ac522
Unverified
Commit
f52ac522
authored
Apr 19, 2019
by
Caleb Maclennan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track CaSILE refactoring of init process
parent
6d7ff8de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
20 deletions
+8
-20
gitlab-ci.yml
gitlab-ci.yml
+1
-0
makefile
makefile
+7
-20
No files found.
gitlab-ci.yml
View file @
f52ac522
...
...
@@ -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
:
...
...
makefile
View file @
f52ac522
...
...
@@ -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
$(ALLTAG
S)
)
))
FORMATS
:
=
$(
sort
$(
notdir
$(ALLTAGS)
))
TAGNAME
:
=
$(
firstword
$(
FORMAT
S)
)
# 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)
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment