Initial commit

This commit is contained in:
2025-09-27 15:28:45 +03:00
commit d6e6a151ad
4 changed files with 55 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
# Pagure repository
REPO="mailcap"
# Get tag name using Pagure Rest API
TAG_NAME=$(curl -s -L https://pagure.io/api/0/"$REPO"/git/tags | jq -r '.tags[]' | grep '^r' | sort -V | tail -n1)
# Replace '-' character with '.'
VERSION="${TAG_NAME//-/.}"
# Trim 'r' character in VERSION variable
VERSION=$(echo "$VERSION" | tr -d 'r')
echo "$VERSION"