Add tag cleaner script to help with changelog issues
This commit is contained in:
parent
a1ee34bb1c
commit
ec02a77c19
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -19,6 +19,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
- name: Remove tags for release on other versions
|
||||||
|
run: ./scripts/tagcleaner.sh
|
||||||
- name: Build and publish mod to CurseForge & Modrinth
|
- name: Build and publish mod to CurseForge & Modrinth
|
||||||
run: |
|
run: |
|
||||||
chmod +x gradlew
|
chmod +x gradlew
|
||||||
|
|
|
||||||
13
scripts/tagcleaner.sh
Executable file
13
scripts/tagcleaner.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# if current tag is 5.2.3+1.16.5, strip all other 5.2.3+* tags
|
||||||
|
current_tag=$(git describe --tags --abbrev=0)
|
||||||
|
current_tag_prefix=$(echo $current_tag | sed 's/+.*/+/g')
|
||||||
|
|
||||||
|
git tag | while read -r other_tag; do
|
||||||
|
if [ "x$other_tag" != "x$current_tag" ] ; then
|
||||||
|
if [[ $other_tag == ${current_tag_prefix}* ]]; then
|
||||||
|
git tag -d $other_tag
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
Loading…
Reference in New Issue
Block a user