Switch to new download format, update dependencies and check-version.sh script
This commit is contained in:
+5
-6
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user