diff --git a/get-updated-badge-info.sh b/get-updated-badge-info.sh
index 33bf4aca44ab04c770567ad7932a8019d69c5d3e..a11fb2dc5b1bbdc95c2871cafe8302228663da49 100644
--- a/get-updated-badge-info.sh
+++ b/get-updated-badge-info.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 echo "collecting stats for badges"
-latest_release_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
+latest_release_tag=$(git tag --sort=-committerdate -l *.*.* | head -1)
 current_pipeline_version=$(cat ./workflow/nextflow.config | grep -o version.* | grep -oP "(?<=').*(?=')")
 current_nextflow_version=$(cat ./workflow/nextflow.config | grep -o nextflowVersion.* | grep -oP "(?<=').*(?=')")