Skip to content

Commit

Permalink
Drop Wrath/Classic specific xml file
Browse files Browse the repository at this point in the history
- Rename Wrath toc to Cata
- Only use to toc files: Mainline and Cata
- Update pre-commit script
  • Loading branch information
spamwax committed Jul 24, 2024
1 parent dd5da5f commit 7879e92
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 954 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bigwigs_pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- dragon
- tww-beta
tags:
- "*"
- "!**-alpha**"
Expand Down
44 changes: 15 additions & 29 deletions .github/workflows/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -7,56 +7,42 @@ CYAN=$'\e[1;34m'
GRAY=$'\e[1;33m'
NC=$'\e[0m'

retail_wago=$(head -n 4 .github/workflows/upload2wago.sh | tail -n 1 | cut -d '=' -f 2)
retail_patch=${retail_wago//./0}
wotlk_wago=$(head -n 5 .github/workflows/upload2wago.sh | tail -n 1 | cut -d '=' -f 2)
wotlk_patch=${wotlk_wago//./0}
mainline_wago=$(head -n 4 .github/workflows/upload2wago.sh | tail -n 1 | cut -d '=' -f 2)
mainline_patch=${mainline_wago//./0}
cata_wago=$(head -n 5 .github/workflows/upload2wago.sh | tail -n 1 | cut -d '=' -f 2)
cata_patch=${cata_wago//./0}


mainline_toc=$(head -n 1 EavesDrop_Mainline.toc | cut -d ' ' -f 3)
retail_toc=$(head -n 1 EavesDrop.toc | cut -d ' ' -f 3)
wotlk_toc=$(head -n 1 EavesDrop_Wrath.toc | cut -d ' ' -f 3)
cata_toc=$(head -n 1 EavesDrop_Cata.toc | cut -d ' ' -f 3)

error=0

if [ "$retail_patch" != "$mainline_toc" ]; then
if [ "$mainline_patch" != "$mainline_toc" ]; then
echo "Retail client Interface version is $mainline_toc"
echo "which doesn't match with wago.io metadata: $retail_wago"
echo "which doesn't match with wago.io metadata: $mainline_wago"
echo "Check EavesDrop_Mainline.toc and .github/workflows/upload2wago.sh"
echo
error=1
fi

if [ "$wotlk_patch" != "$wotlk_toc" ]; then
echo "WOTLK client Interface version is $wotlk_toc"
echo "which doesn't match with wago.io metadata: $wotlk_wago"
echo "Check EavesDrop_Wrath.toc and .github/workflows/upload2wago.sh"
echo
error=1
fi

if [ "$mainline_toc" != "$retail_toc" ]; then
echo "EavesDrop_Mainline.toc & Eavesdrop.toc have different Interface values"
echo "$mainline_toc <> $retail_toc"
if [ "$cata_patch" != "$cata_toc" ]; then
echo "CATA client Interface version is $cata_toc"
echo "which doesn't match with wago.io metadata: $cata_wago"
echo "Check EavesDrop_Cata.toc and .github/workflows/upload2wago.sh"
echo
error=1
fi

mainline_addon_version=$(head -n 5 EavesDrop_Mainline.toc | tail -n 1 | cut -d ' ' -f 3)
retail_addon_version=$(head -n 5 EavesDrop.toc | tail -n 1 | cut -d ' ' -f 3)
wotlk_addon_version=$(head -n 5 EavesDrop_Wrath.toc | tail -n 1 | cut -d ' ' -f 3)
cata_addon_version=$(head -n 5 EavesDrop_Cata.toc | tail -n 1 | cut -d ' ' -f 3)

if [ "$mainline_addon_version" != "$wotlk_addon_version" ]; then
echo "Addon version mismatch between WOTLK and Retail: $wotlk_addon_version <> $mainline_addon_version"
if [ "$mainline_addon_version" != "$cata_addon_version" ]; then
echo "Addon version mismatch between CATA and Retail: $cata_addon_version <> $mainline_addon_version"
echo
error=1
fi

if [ "$mainline_addon_version" != "$retail_addon_version" ]; then
echo "Addon version mismatch between EavesDrop_Mainline.toc"
echo "and EavesDrop.toc: $mainline_addon_version <> $retail_addon_version"
error=1
fi

pat='(\s*--\s+@?(end-)?debug@?)|(\s*--\s*(end-)?debug@?)|(\s*\S+.*--@(end-)?debug@)|(\s*--@(end-)?debug[\s\S]+@)|(--@\s+(end-)?debug@)|(\s*--\s+@(end-)?debug@)|(--\s*@(end-)?debug(?:(((?!@).)+|\b)))$'
for file in $(git diff --name-only --cached); do
if [[ $file != *.lua ]]; then
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upload2wago.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
# DO NOT MOVE THE NEXT 3 LINES. Their value should always be equivalent to 'Interface' in .toc files
# A pre-commit git script will use these and compare to .toc files.
SUPPORTED_RETAIL_PATCH=110000
SUPPORTED_WOTLK_PATCH=3.4.1
SUPPORTED_RETAIL_PATCH=11.0.0
SUPPORTED_CATA_PATCH=4.4.0

set -x

cat <<END > metadata.json
{ "label": "$TAG_NAME", "stability": "stable", "changelog": "Release v$TAG_NAME\\n\\n$CHANGELOG", "supported_retail_patch": "$SUPPORTED_RETAIL_PATCH", "supported_wotlk_patch": "$SUPPORTED_WOTLK_PATCH" }
{ "label": "$TAG_NAME", "stability": "stable", "changelog": "Release v$TAG_NAME\\n\\n$CHANGELOG", "supported_retail_patch": "$SUPPORTED_RETAIL_PATCH", "supported_cata_patch": "$SUPPORTED_CATA_PATCH" }
END

sed -z -i 's/\n$//;s/\n/\\n/g' metadata.json
Expand Down
4 changes: 2 additions & 2 deletions EavesDrop.toc → EavesDrop_Cata.toc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Interface: 110000
## Interface: 40400
## Name: EavesDrop
## Title: EavesDrop
## Notes: A simple combat log that displays events similar to SCT
## Version: @project-version@
## Author: Grayhoof (Edited by Domzae, Updated for SL/WOTLK/DF by spamwax)
## Author: Grayhoof (Edited by Domzae, Updated for retail & classic by |cFFF48CBAspamwax|r)
## SavedVariables: EavesDropDB
## SavedVariablesPerCharacter: EavesDropStatsDB
## X-Website: https://github.com/spamwax/EavesDrop
Expand Down
2 changes: 1 addition & 1 deletion EavesDrop_Mainline.toc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Title: EavesDrop
## Notes: A simple combat log that displays events similar to SCT
## Version: @project-version@
## Author: Grayhoof (Edited by Domzae, Updated for SL/WOTLK/DF by spamwax)
## Author: Grayhoof (Edited by Domzae, Updated for retail & classic by |cFFF48CBAspamwax|r)
## SavedVariables: EavesDropDB
## SavedVariablesPerCharacter: EavesDropStatsDB
## X-Website: https://github.com/spamwax/EavesDrop
Expand Down
26 changes: 0 additions & 26 deletions EavesDrop_Wrath.toc

This file was deleted.

Loading

0 comments on commit 7879e92

Please sign in to comment.