Update package version to 0.12.2

This commit is contained in:
2026-09-04 15:57:35 +03:00
parent 3fcd86059e
commit 88272a81fa
2 changed files with 11 additions and 11 deletions
+8 -8
View File
@@ -1,15 +1,15 @@
#!/bin/bash
# Git repository
REPO="https://git.libssh.org/projects/libssh.git"
# Gitlab repository
REPO="libssh/libssh-mirror"
# Get tag name using 'git ls-remote'
TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" | cut -d'/' -f3 | grep 'libssh-' | tail -1)
# Replace slash with URL encoded representation
REPO=$(echo "$REPO" | sed 's|/|%2F|g')
# Remove prefix
# Get tag name using Gitlab Rest API
TAG_NAME=$(curl -s -L https://gitlab.com/api/v4/projects/"$REPO"/repository/tags | jq -r '.[0].name')
# Trim prefix
VERSION=${TAG_NAME//libssh-/}
# Replace '-' with '.'
VERSION=${VERSION//-/.}
echo "$VERSION"