Update package version to 0.12.2
This commit is contained in:
+8
-8
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user