Update source.sh script and add check-version.sh script

This commit is contained in:
2025-09-13 21:05:04 +03:00
parent 49c8c25404
commit b8b5ff05ec
2 changed files with 24 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
# Gitlab repository
REPO="xdg/startup-notification"
# Replace slash with URL encoded representation
REPO=$(echo "$REPO" | sed 's|/|%2F|g')
# Get tag name using Gitlab Rest API
TAG_NAME=$(curl -s -L https://gitlab.freedesktop.org/api/v4/projects/"$REPO"/repository/tags | jq -r '.[0].name')
# Trim prefix
VERSION=${TAG_NAME//STARTUP_NOTIFICATION_/}
# Replace '_' with '.'
VERSION=${VERSION//_/.}
echo "$VERSION"