From f1b38c903a0efd527e5381f0599ed3877f79b893 Mon Sep 17 00:00:00 2001 From: Pcornat Date: Sun, 1 Sep 2024 19:03:45 +0200 Subject: [PATCH] Small tool to update submodules to latest tags --- external/update_submodules.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 external/update_submodules.sh diff --git a/external/update_submodules.sh b/external/update_submodules.sh new file mode 100755 index 0000000..610f1d0 --- /dev/null +++ b/external/update_submodules.sh @@ -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