cs: more attempts to fix Chez Scheme submodule update
When `#:extra-repo-dir` is used in a site configuration, the extra repos need to have a "master" branch to enable updates.
This commit is contained in:
parent
32330c1327
commit
3127b324c4
21
Makefile
21
Makefile
|
@ -381,9 +381,9 @@ $(BUILD_FOR_FOR_SCHEME_DIR)/ChezScheme:
|
|||
then cd $(BUILD_FOR_FOR_SCHEME_DIR) && git clone $(GIT_CLONE_ARGS_qq) $(CHEZ_SCHEME_REPO) ChezScheme ; \
|
||||
else $(MAKE) clone-ChezScheme-as-extra GIT_CLONE_ARGS_qq="" ; fi
|
||||
|
||||
update-ChezScheme:
|
||||
cd $(BUILD_FOR_FOR_SCHEME_DIR)/ChezScheme && git pull -q && git submodule -q update
|
||||
|
||||
# For this target, `GIT_CLONE_ARGS_qq` normally should not include "--depth 1",
|
||||
# because `EXTRA_REPOS_BASE` is likely to be a dumb transport that does not
|
||||
# support shallow copies
|
||||
clone-ChezScheme-as-extra:
|
||||
cd $(BUILD_FOR_FOR_SCHEME_DIR) && git clone $(GIT_CLONE_ARGS_qq) $(EXTRA_REPOS_BASE)ChezScheme/.git
|
||||
cd $(BUILD_FOR_FOR_SCHEME_DIR)/ChezScheme && git clone $(GIT_CLONE_ARGS_qq) $(EXTRA_REPOS_BASE)nanopass/.git
|
||||
|
@ -391,6 +391,21 @@ clone-ChezScheme-as-extra:
|
|||
cd $(BUILD_FOR_FOR_SCHEME_DIR)/ChezScheme && git clone $(GIT_CLONE_ARGS_qq) $(EXTRA_REPOS_BASE)zlib/.git
|
||||
cd $(BUILD_FOR_FOR_SCHEME_DIR)/ChezScheme && git clone $(GIT_CLONE_ARGS_qq) $(EXTRA_REPOS_BASE)lz4/.git
|
||||
|
||||
update-ChezScheme:
|
||||
if [ "$(EXTRA_REPOS_BASE)" = "" ] ; \
|
||||
then $(MAKE) update-ChezScheme-normal ; \
|
||||
else $(MAKE) update-ChezScheme-as-extra ; fi
|
||||
|
||||
update-ChezScheme-normal:
|
||||
cd $(BUILD_FOR_FOR_SCHEME_DIR)/ChezScheme && git pull -q && git submodule -q init && git submodule -q update
|
||||
|
||||
update-ChezScheme-as-extra:
|
||||
cd $(BUILD_FOR_FOR_SCHEME_DIR)/ChezScheme && git pull -q
|
||||
cd $(BUILD_FOR_FOR_SCHEME_DIR)/ChezScheme/nanopass && git pull origin master -q
|
||||
cd $(BUILD_FOR_FOR_SCHEME_DIR)/ChezScheme/stex && git pull origin master -q
|
||||
cd $(BUILD_FOR_FOR_SCHEME_DIR)/ChezScheme/zlib && git pull origin master -q
|
||||
cd $(BUILD_FOR_FOR_SCHEME_DIR)/ChezScheme/lz4 && git pull origin master -q
|
||||
|
||||
WIN32_CS_COPY_ARGS_EXCEPT_PKGS_SUT = SRC_CATALOG="$(SRC_CATALOG)" RACKETCS_SUFFIX="$(RACKETCS_SUFFIX)" \
|
||||
SCHEME_SRC="$(SCHEME_SRC)" EXTRA_REPOS_BASE="$(EXTRA_REPOS_BASE)"
|
||||
WIN32_CS_COPY_ARGS_EXCEPT_SUT = PKGS="$(PKGS)" $(WIN32_CS_COPY_ARGS_EXCEPT_PKGS_SUT)
|
||||
|
|
|
@ -67,7 +67,8 @@
|
|||
|
||||
;; ----------------------------------------
|
||||
|
||||
(let ([submodules '("nanopass" "stex" "zlib" "lz4")])
|
||||
(let ([submodules '("nanopass" "stex" "zlib" "lz4")]
|
||||
[readmes '("ReadMe.md" "ReadMe" "README" "README.md")])
|
||||
(define (clone from to [git-clone-args '()])
|
||||
(apply system*! (append
|
||||
(list "git"
|
||||
|
@ -76,13 +77,15 @@
|
|||
(list from to))))
|
||||
(cond
|
||||
[extra-repos-base
|
||||
;; Intentionally not using `git-clone-args`
|
||||
;; Intentionally not using `git-clone-args`, because dumb transport
|
||||
;; (likely for `extra-repos-base`) does not support shallow copies
|
||||
(unless (directory-exists? scheme-dir)
|
||||
(clone (format "~aChezScheme/.git" extra-repos-base)
|
||||
scheme-dir))
|
||||
(for ([submodule (in-list submodules)])
|
||||
(for ([submodule (in-list submodules)]
|
||||
[readme (in-list readmes)])
|
||||
(define dir (build-path scheme-dir submodule))
|
||||
(unless (directory-exists? (build-path dir ".git"))
|
||||
(unless (file-exists? (build-path dir readme))
|
||||
(clone (format "~a~a/.git" extra-repos-base submodule)
|
||||
(build-path scheme-dir submodule))))
|
||||
(when pull?
|
||||
|
@ -90,7 +93,7 @@
|
|||
(system*! "git" "pull")
|
||||
(for ([submodule (in-list submodules)])
|
||||
(parameterize ([current-directory (build-path submodule)])
|
||||
(system*! "git" "pull")))))]
|
||||
(system*! "git" "pull" "origin" "master")))))]
|
||||
[else
|
||||
(unless (directory-exists? scheme-dir)
|
||||
(clone "https://github.com/mflatt/ChezScheme"
|
||||
|
|
Loading…
Reference in New Issue
Block a user