From 9c2ef2c85d366ae884c0cc86157e6316eed7328b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 20 May 2020 15:01:56 +0200 Subject: [PATCH] update-common: delete submodule files that would prevent a checkout --- makefiles/targets.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/makefiles/targets.mk b/makefiles/targets.mk index 618fd48..942ea35 100644 --- a/makefiles/targets.mk +++ b/makefiles/targets.mk @@ -44,6 +44,7 @@ build-nim: | sanity-checks ARCH_OVERRIDE=$(ARCH_OVERRIDE) \ "$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/build_nim.sh" "$(NIM_DIR)" ../Nim-csources ../nimble "$(CI_CACHE)" +#- for each submodule, delete checked out files that prevent a fresh checkout #- in case of submodule URL changes, propagates that change in the parent repo's .git directory #- initialises and updates the Git submodules #- manages the AppVeyor cache of Nim compiler binaries @@ -51,6 +52,7 @@ build-nim: | sanity-checks #- allows parallel building with the '+' prefix #- rebuilds the Nim compiler if the corresponding submodule is updated update-common: | sanity-checks + git submodule foreach --quiet 'git ls-files -k --exclude-standard | while read F; do rm -rf "$$F"; done' git submodule update --init --recursive || true # changing URLs in a submodule's submodule means we have to sync and update twice git submodule sync --quiet --recursive