mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
make: speedup fetchthirdparty
- shallow clone submodules configured as such - on CI, shallow clone all submodules - use 3 jobs
This commit is contained in:
committed by
Frans de Jonge
parent
f3dcc70d8d
commit
8b8258b44a
13
Makefile
13
Makefile
@@ -160,7 +160,18 @@ coverage: $(INSTALL_DIR)/koreader/.luacov
|
||||
fetchthirdparty:
|
||||
git submodule init
|
||||
git submodule sync
|
||||
git submodule update
|
||||
ifneq (,$(CI))
|
||||
git submodule update --depth 1 --jobs 3
|
||||
else
|
||||
# Force shallow clones of submodules configured as such.
|
||||
git submodule update --jobs 3 --depth 1 $(shell \
|
||||
git config --file=.gitmodules --name-only --get-regexp '^submodule\.[^.]+\.shallow$$' true \
|
||||
| sed 's/\.shallow$$/.path/' \
|
||||
| xargs -n1 git config --file=.gitmodules \
|
||||
)
|
||||
# Update the rest.
|
||||
git submodule update --jobs 3
|
||||
endif
|
||||
$(MAKE) -C $(KOR_BASE) fetchthirdparty
|
||||
|
||||
VERBOSE ?= @
|
||||
|
||||
Reference in New Issue
Block a user