mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 14:45:07 +03:00

2. added SCTP protocol and schema support 3. added set of NAS models support (Asustor, ReadyNAS, Drobo, QNAP, WD, Synology, Terramaster) 4. moved to fc00::/7 private segment 5. added Windows, MacOS and Linux UI for peers edit and current status
22 lines
478 B
Bash
22 lines
478 B
Bash
#!/bin/sh
|
|
|
|
# Get the last tag
|
|
TAG=$(git describe --abbrev=0 --tags --match="v[0-9]*\.[0-9]*\.[0-9]*" 2>/dev/null)
|
|
|
|
# Did getting the tag succeed?
|
|
if [ $? != 0 ] || [ -z "$TAG" ]; then
|
|
printf -- "unknown"
|
|
exit 0
|
|
fi
|
|
|
|
# Get the current branch
|
|
BRANCH=$(git symbolic-ref -q HEAD --short 2>/dev/null)
|
|
|
|
# Did getting the branch succeed?
|
|
if [ $? != 0 ] || [ -z "$BRANCH" ]; then
|
|
BRANCH="master"
|
|
fi
|
|
|
|
STAG=$(echo $TAG | sed 's/v//' | sed 's/[^0123456789.].//')
|
|
|
|
printf '%s' "$STAG"
|