Initial commit

This commit is contained in:
2025-09-01 17:08:26 +03:00
commit ea59e098ab
4 changed files with 56 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
# Pagure repository
REPO="newt"
# 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"