iiegn commited on
Commit
e41e43a
·
verified ·
1 Parent(s): 4727d34

Fix: Add git checkout UD_REV bc git fetch UD_REV sometimes misses

Browse files
Files changed (1) hide show
  1. tools/01_fetch_ud_repos.sh +2 -1
tools/01_fetch_ud_repos.sh CHANGED
@@ -123,7 +123,8 @@ done
123
 
124
  # git show-ref refs/tags/${UD_REV}
125
  # echo "git submodule --quiet foreach 'export name; bash -c \"(git fetch --depth 1 origin refs/tags/${UD_REV}:refs/tags/${UD_REV} ) || (echo \$name; pushd ../..; git submodule deinit -f \$name; popd)\" '" >> ${GIT_SUBMODULES_ADD}
126
- echo "git submodule --quiet foreach 'export name; bash -c \"( REF=\$(git ls-remote --exit-code origin refs/tags/${UD_REV} | cut -f1) && [ ! -z \\\$REF ] && git fetch --depth=1 origin \\\$REF && echo \\\$REF > .tag-${UD_REV}) || ( echo No rev:${UD_REV} \\\$name )\" ' " >> ${UDS_SUBDIR}/${GIT_SUBMODULES_ADD}
 
127
 
128
 
129
  echo "Missing repos:"
 
123
 
124
  # git show-ref refs/tags/${UD_REV}
125
  # echo "git submodule --quiet foreach 'export name; bash -c \"(git fetch --depth 1 origin refs/tags/${UD_REV}:refs/tags/${UD_REV} ) || (echo \$name; pushd ../..; git submodule deinit -f \$name; popd)\" '" >> ${GIT_SUBMODULES_ADD}
126
+ echo "git submodule --quiet foreach 'export name; bash -c \"( REF=\$(git ls-remote --exit-code origin refs/tags/${UD_REV} | cut -f1) && [ ! -z \\\$REF ] && git fetch --depth=1 origin \\\$REF && git checkout \\\$REF && echo \\\$REF > .tag-${UD_REV}) || ( echo No rev:${UD_REV} \\\$name )\" ' " >> ${UDS_SUBDIR}/${GIT_SUBMODULES_ADD}
127
+ echo "git submodule --quiet foreach git status -s | grep -v .tag-" >> ${UDS_SUBDIR}/${GIT_SUBMODULES_ADD}
128
 
129
 
130
  echo "Missing repos:"