diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..a84e6e4 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Pagure repository +REPO="libaio" + +# Get tag name using Pagure Rest API +TAG_NAME=$(curl -s -L https://pagure.io/api/0/"$REPO"/git/tags | jq -r '.tags[]' | grep '^libaio-' | sort -V | tail -n1) + +# Trim prefix +VERSION=${TAG_NAME//libaio-/} + +echo "$VERSION"