Small tool to update submodules to latest tags

This commit is contained in:
Pcornat 2024-09-01 19:03:45 +02:00
parent fe3adeed4c
commit f1b38c903a
Signed by: Pcornat
GPG Key ID: E0326CC678A00BDD

13
external/update_submodules.sh vendored Executable file
View File

@ -0,0 +1,13 @@
#! /usr/bin/env bash
for dir in * ; do
dir=${dir%*/}
if [ -d "${dir}" ]; then
echo "${dir}"
cd "${dir}"
latest_commit_with_tag=`git rev-list --tags --max-count=1`
latest_tag=`git describe --tags ${latest_commit_with_tag}`
git checkout "${latest_tag}"
cd ..
fi
done