Initial commit
This commit is contained in:
@@ -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"
|
||||
Reference in New Issue
Block a user