mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
13 lines
307 B
Bash
13 lines
307 B
Bash
#!/bin/sh
|
|
|
|
LatestTagId=$(git rev-list --tags --max-count=1 --abbrev-commit)
|
|
LatestCommitId=$(git rev-list --all --max-count=1 --abbrev-commit)
|
|
|
|
if [ $LatestTagId = $LatestCommitId ]; then
|
|
Version=$(git describe --tags --match "v*" $LatestTagId)
|
|
else
|
|
Version="c""$LatestCommitId"
|
|
fi
|
|
|
|
echo "$Version"
|