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:
19
scripts/RemoveOldVersionTags.sh
Normal file
19
scripts/RemoveOldVersionTags.sh
Normal 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
|
||||
Reference in New Issue
Block a user