]> granicus.if.org Git - esp-idf/commitdiff
ci: Fix the parsing of submodule paths
authorAnton Maklakov <anton@espressif.com>
Wed, 6 Mar 2019 11:37:34 +0000 (19:37 +0800)
committerbot <bot@espressif.com>
Tue, 2 Apr 2019 05:02:04 +0000 (05:02 +0000)
.gitlab-ci.yml
tools/ci/mirror-submodule-update.sh

index e473d9054bef9c331d137fa7c87805eae9b5fdcf..6601e4a7f30475fedd8a397ebc3740d03d5ef23f 100644 (file)
@@ -18,7 +18,7 @@ variables:
   GET_SOURCES_ATTEMPTS: "10"
   ARTIFACT_DOWNLOAD_ATTEMPTS: "10"
 
-  # We use get_sources.sh script to fetch the submodules and/or re-fetch the repo
+  # We use get-full-sources.sh script to fetch the submodules and/or re-fetch the repo
   # if it was corrupted (if submodule update fails this can happen)
   GIT_STRATEGY: fetch
   GIT_SUBMODULE_STRATEGY: none
index 04471f143e3a7a90e85a3fcaabb62fac5c274796..94e0c09ce9068076bba47cffe2d39d5fb337cde2 100755 (executable)
@@ -54,13 +54,15 @@ git submodule init
 # 2
 # Replacing each submodule URL of the current repository
 # according to the one found in the MIRRORLIST
-
-#   SED parses the strings like:
-#
-#-b991c67c1d91574ef22336cc3a5944d1e63230c9 roms/ipxe
-#b991c67c1d91574ef22336cc3a5944d1e63230c9 roms/ipxe (v1.0.0-2388-gb991c67)
 #
-for SUBPATH in $(git submodule status | sed -E 's/.*[[:space:]](.*)([[:space:]].*|$)/\1/')
+# Selecting paths among lines:
+# ...
+#submodule.components/esp32/lib.path
+#submodule.components/esp32/lib.url
+#submodule.components/esptool_py/esptool.path
+#submodule.components/esptool_py/esptool.url
+#...
+for SUBPATH in $(git config -f .gitmodules --list --name-only | grep "\.path" | sed 's/^submodule\.\([^ ]*\)\.path$/\1/')
 do
     SUBMIRROR=$(join -o"2.2" <(echo ${SUBPATH}) <(sort ${MIRRORLIST}))
     [ ${SUBMIRROR} ] || continue