9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00

[ci skip] RemoveOldVersionTags.sh

This commit is contained in:
violetc
2022-09-15 09:31:05 +00:00
parent 93722207d9
commit 76b95c4abe

View File

@@ -0,0 +1,19 @@
if [ $# != 1 ]; then
echo need input version
exit 1
fi
version=$1
lastestTag=$(git describe --tags --abbrev=0 --match "$version-*")
echo "$(git tag --list "$version-*")" >> tags.temp
while read line
do
if [ $line != $lastestTag ]; then
git push origin :refs/tags/$line
#echo $line
fi
done < tags.temp
rm tags.temp