Switch to new download format, update dependencies and check-version.sh script

This commit is contained in:
2026-04-30 17:01:43 +03:00
parent 3b3b095fcf
commit 830f3c492d
3 changed files with 18 additions and 17 deletions
+5 -6
View File
@@ -1,12 +1,11 @@
#!/bin/bash
# Git repository
REPO="http://bitmath.org/git/mtdev.git"
URL="https://bitmath.org/code/mtdev/"
# Get tag name using 'git ls-remote'
TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" 2>/dev/null | tail -1 | cut -d'/' -f3)
# Get version number from FTP server
VERSION=$(curl -L "$URL" | grep -oP "mtdev v(\d+.\d+.\d+)" | head -n1)
# Trim 'v' character in TAG_NAME variable
VERSION=$(echo "$TAG_NAME" | tr -d 'v')
# Remove prefix
VERSION=${VERSION//mtdev v/}
echo "$VERSION"