Files
python-dbus/check-version.sh
T
2026-05-06 15:25:34 +03:00

16 lines
364 B
Bash

#!/bin/bash
# Gitlab repository
REPO="dbus/dbus-python"
# 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 suffix
VERSION=${TAG_NAME//dbus-python-/}
echo "$VERSION"