@@ -74,7 +74,7 @@ if [[ ${BASH_VERSINFO[0]} -lt 4 ]] || [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VER
74
74
fi
75
75
76
76
# Game versions for uploading
77
- declare -A game_flavor=( [" retail" ]=" retail" [" classic" ]=" classic" [" bcc" ]=" bcc" [" mainline" ]=" retail" [" tbc" ]=" bcc" [" vanilla" ]=" classic" )
77
+ declare -A game_flavor=( [" retail" ]=" retail" [" classic" ]=" classic" [" bcc" ]=" bcc" [" mainline" ]=" retail" [" tbc" ]=" bcc" [" vanilla" ]=" classic" [ " wrath " ]= " wrath " [ " wotlkc " ]= " wrath " )
78
78
79
79
declare -A game_type_version=() # type -> version
80
80
declare -A game_type_interface=() # type -> toc
@@ -116,7 +116,8 @@ filename_filter() {
116
116
[ -n " $skip_invalid " ] && invalid=" &"
117
117
if [[ -n $game_type ]] && [[ " $game_type " != " retail" ]] && \
118
118
[[ " $game_type " != " classic" || " ${si_project_version,,} " != * " -classic" * ]] && \
119
- [[ " $game_type " != " bcc" || " ${si_project_version,,} " != * " -bcc" * ]]
119
+ [[ " $game_type " != " bcc" || " ${si_project_version,,} " != * " -bcc" * ]] && \
120
+ [[ " $game_type " != " wrath" || " ${si_project_version,,} " != * " -wrath" * ]]
120
121
then
121
122
# only append the game type if the tag doesn't include it
122
123
classic=" -$game_type "
@@ -217,7 +218,7 @@ while getopts ":celLzusSop:dw:a:r:t:g:m:n:" opt; do
217
218
g) # Set the game type or version
218
219
OPTARG=" ${OPTARG,,} "
219
220
case " $OPTARG " in
220
- retail|classic|bcc) game_type=" $OPTARG " ;; # game_version from toc
221
+ retail|classic|bcc|wrath ) game_type=" $OPTARG " ;; # game_version from toc
221
222
mainline) game_type=" retail" ;;
222
223
* )
223
224
# Set game version (x.y.z)
@@ -233,6 +234,8 @@ while getopts ":celLzusSop:dw:a:r:t:g:m:n:" opt; do
233
234
game_type=" classic"
234
235
elif [[ ${BASH_REMATCH[1]} == " 2" ]]; then
235
236
game_type=" bcc"
237
+ elif [[ ${BASH_REMATCH[1]} == " 3" ]]; then
238
+ game_type=" wrath"
236
239
else
237
240
game_type=" retail"
238
241
fi
@@ -1064,6 +1067,7 @@ do_toc() {
1064
1067
" " ) toc_game_type= ;;
1065
1068
11* ) toc_game_type=" classic" ;;
1066
1069
20* ) toc_game_type=" bcc" ;;
1070
+ 30* ) toc_game_type=" wrath" ;;
1067
1071
* ) toc_game_type=" retail"
1068
1072
esac
1069
1073
si_game_type_interface=()
@@ -1072,7 +1076,7 @@ do_toc() {
1072
1076
1073
1077
root_toc_version=" $toc_version "
1074
1078
1075
- if [[ ${toc_name} =~ " $package_name " [-_](Mainline| Classic| Vanilla| BCC| TBC)\. toc$ ]]; then
1079
+ if [[ ${toc_name} =~ " $package_name " [-_](Mainline| Classic| Vanilla| BCC| TBC| Wrath | WOTLKC )\. toc$ ]]; then
1076
1080
# Flavored
1077
1081
if [[ -z " $toc_version " ]]; then
1078
1082
echo " $toc_name is missing an interface version." >&2
@@ -1103,6 +1107,7 @@ do_toc() {
1103
1107
case $toc_version in
1104
1108
11* ) toc_game_type=" classic" ;;
1105
1109
20* ) toc_game_type=" bcc" ;;
1110
+ 30* ) toc_game_type=" wrath" ;;
1106
1111
* ) toc_game_type=" retail"
1107
1112
esac
1108
1113
fi
@@ -1113,6 +1118,7 @@ do_toc() {
1113
1118
case $toc_game_type in
1114
1119
classic) toc_version=$( sed -n ' /@non-[-a-z]*@/,/@end-non-[-a-z]*@/{//b;p}' <<< " $toc_file" | awk ' /#[[:blank:]]*## Interface:[[:blank:]]*(11)/ { print $NF; exit }' ) ;;
1115
1120
bcc) toc_version=$( sed -n ' /@non-[-a-z]*@/,/@end-non-[-a-z]*@/{//b;p}' <<< " $toc_file" | awk ' /#[[:blank:]]*## Interface:[[:blank:]]*(20)/ { print $NF; exit }' ) ;;
1121
+ wrath) toc_version=$( sed -n ' /@non-[-a-z]*@/,/@end-non-[-a-z]*@/{//b;p}' <<< " $toc_file" | awk ' /#[[:blank:]]*## Interface:[[:blank:]]*(30)/ { print $NF; exit }' ) ;;
1116
1122
esac
1117
1123
# This becomes the actual interface version after replacements
1118
1124
root_toc_version=" $toc_version "
@@ -1172,6 +1178,7 @@ set_build_version() {
1172
1178
case $toc_version in
1173
1179
11* ) toc_game_type=" classic" ;;
1174
1180
20* ) toc_game_type=" bcc" ;;
1181
+ 30* ) toc_game_type=" wrath" ;;
1175
1182
* ) toc_game_type=" retail"
1176
1183
esac
1177
1184
if [[ -z $game_type || $game_type == " $toc_game_type " ]]; then
@@ -1203,14 +1210,14 @@ if [[ -z "$package" ]]; then
1203
1210
exit 1
1204
1211
fi
1205
1212
package=${package% .toc}
1206
- if [[ $package =~ ^(.* )([-_](Mainline| Classic| Vanilla| BCC| TBC))$ ]]; then
1213
+ if [[ $package =~ ^(.* )([-_](Mainline| Classic| Vanilla| BCC| TBC| Wrath | WOTLKC ))$ ]]; then
1207
1214
echo " Ambiguous addon name. No fallback TOC file or addon name includes an expansion suffix (${BASH_REMATCH[2]} ). Set 'package-as' in .pkgmeta" >&2
1208
1215
exit 1
1209
1216
fi
1210
1217
fi
1211
1218
1212
1219
# Parse the project root TOC files for info first
1213
- for toc_path in " $topdir /$package " {,-Mainline,_Mainline,-Classic,_Classic,-Vanilla,_Vanilla,-BCC,_BCC,-TBC,_TBC}.toc; do
1220
+ for toc_path in " $topdir /$package " {,-Mainline,_Mainline,-Classic,_Classic,-Vanilla,_Vanilla,-BCC,_BCC,-TBC,_TBC,-Wrath,_Wrath,-WOTLKC,_WOTLKC }.toc; do
1214
1221
if [[ -f " $toc_path " ]]; then
1215
1222
set_toc_project_info " $toc_path "
1216
1223
toc_root_paths[" $topdir " ]=" $package "
@@ -1226,7 +1233,7 @@ done
1226
1233
1227
1234
# Parse project TOC files
1228
1235
for path in " ${! toc_root_paths[@]} " ; do
1229
- for toc_path in " $path /${toc_root_paths[$path]} " {,-Mainline,_Mainline,-Classic,_Classic,-Vanilla,_Vanilla,-BCC,_BCC,-TBC,_TBC}.toc; do
1236
+ for toc_path in " $path /${toc_root_paths[$path]} " {,-Mainline,_Mainline,-Classic,_Classic,-Vanilla,_Vanilla,-BCC,_BCC,-TBC,_TBC,-Wrath,_Wrath,-WOTLKC,_WOTLKC }.toc; do
1230
1237
if [[ -f " $toc_path " ]]; then
1231
1238
set_toc_project_info " $toc_path "
1232
1239
do_toc " $toc_path " " ${toc_root_paths[$path]} "
@@ -1683,6 +1690,7 @@ copy_directory_tree() {
1683
1690
[ " $_cdt_gametype " != " retail" ] && _cdt_filters+=" |lua_filter version-retail|lua_filter retail"
1684
1691
[ " $_cdt_gametype " != " classic" ] && _cdt_filters+=" |lua_filter version-classic"
1685
1692
[ " $_cdt_gametype " != " bcc" ] && _cdt_filters+=" |lua_filter version-bcc"
1693
+ [ " $_cdt_gametype " != " wrath" ] && _cdt_filters+=" |lua_filter version-wrath"
1686
1694
[ -n " $_cdt_localization " ] && _cdt_filters+=" |localization_filter"
1687
1695
;;
1688
1696
* .xml)
@@ -1693,6 +1701,7 @@ copy_directory_tree() {
1693
1701
[ " $_cdt_gametype " != " retail" ] && _cdt_filters+=" |xml_filter version-retail|xml_filter retail"
1694
1702
[ " $_cdt_gametype " != " classic" ] && _cdt_filters+=" |xml_filter version-classic"
1695
1703
[ " $_cdt_gametype " != " bcc" ] && _cdt_filters+=" |xml_filter version-bcc"
1704
+ [ " $_cdt_gametype " != " wrath" ] && _cdt_filters+=" |xml_filter version-wrath"
1696
1705
;;
1697
1706
* .toc)
1698
1707
# We only care about processing project TOC files
@@ -1704,6 +1713,7 @@ copy_directory_tree() {
1704
1713
case ${toc_root_interface["$_cdt_srcdir/$file"]} in
1705
1714
11* ) _cdt_gametype=" classic" ;;
1706
1715
20* ) _cdt_gametype=" bcc" ;;
1716
+ 30* ) _cdt_gametype=" wrath" ;;
1707
1717
* ) _cdt_gametype=" retail"
1708
1718
esac
1709
1719
fi
@@ -1715,6 +1725,7 @@ copy_directory_tree() {
1715
1725
_cdt_filters+=" |toc_filter version-retail $( [[ " $_cdt_gametype " != " retail" ]] && echo " true" ) "
1716
1726
_cdt_filters+=" |toc_filter version-classic $( [[ " $_cdt_gametype " != " classic" ]] && echo " true" ) "
1717
1727
_cdt_filters+=" |toc_filter version-bcc $( [[ " $_cdt_gametype " != " bcc" ]] && echo " true" ) "
1728
+ _cdt_filters+=" |toc_filter version-wrath $( [[ " $_cdt_gametype " != " wrath" ]] && echo " true" ) "
1718
1729
_cdt_filters+=" |toc_interface_filter '${si_game_type_interface_all[${_cdt_gametype:- }]} ' '${toc_root_interface["$_cdt_srcdir/$file"]} '"
1719
1730
[ -n " $_cdt_localization " ] && _cdt_filters+=" |localization_filter"
1720
1731
fi
@@ -1730,10 +1741,10 @@ copy_directory_tree() {
1730
1741
echo " Copying: $file "
1731
1742
1732
1743
# Make sure we're not causing any surprises
1733
- if [[ -z $_cdt_gametype && ( $file == * " .lua" || $file == * " .xml" || $file == * " .toc" ) ]] && grep -q ' @\(non-\)\?version-\(retail\|classic\|bcc\)@' " $_cdt_srcdir /$file " ; then
1744
+ if [[ -z $_cdt_gametype && ( $file == * " .lua" || $file == * " .xml" || $file == * " .toc" ) ]] && grep -q ' @\(non-\)\?version-\(retail\|classic\|bcc\|wrath\ )@' " $_cdt_srcdir /$file " ; then
1734
1745
echo " Error! Build type version keywords are not allowed in a multi-version build." >&2
1735
1746
echo " These should be replaced with lua conditional statements:" >&2
1736
- grep -n ' @\(non-\)\?version-\(retail\|classic\|bcc\)@' " $_cdt_srcdir /$file " | sed ' s/^/ /' >&2
1747
+ grep -n ' @\(non-\)\?version-\(retail\|classic\|bcc\|wrath\ )@' " $_cdt_srcdir /$file " | sed ' s/^/ /' >&2
1737
1748
echo " See https://wowpedia.fandom.com/wiki/WOW_PROJECT_ID" >&2
1738
1749
exit 1
1739
1750
fi
@@ -1751,6 +1762,7 @@ copy_directory_tree() {
1751
1762
retail) new_file+=" _Mainline.toc" ;;
1752
1763
classic) new_file+=" _Vanilla.toc" ;;
1753
1764
bcc) new_file+=" _TBC.toc" ;;
1765
+ wrath) new_file+=" _Wrath.toc" ;;
1754
1766
esac
1755
1767
1756
1768
echo " Creating $new_file [$toc_version ]"
@@ -1764,6 +1776,7 @@ copy_directory_tree() {
1764
1776
_cdt_filters+=" |toc_filter version-retail $( [[ " $type " != " retail" ]] && echo " true" ) "
1765
1777
_cdt_filters+=" |toc_filter version-classic $( [[ " $type " != " classic" ]] && echo " true" ) "
1766
1778
_cdt_filters+=" |toc_filter version-bcc $( [[ " $type " != " bcc" ]] && echo " true" ) "
1779
+ _cdt_filters+=" |toc_filter version-wrath $( [[ " $type " != " wrath" ]] && echo " true" ) "
1767
1780
_cdt_filters+=" |toc_interface_filter '$toc_version ' '$root_toc_version '"
1768
1781
_cdt_filters+=" |line_ending_filter"
1769
1782
@@ -2506,12 +2519,13 @@ upload_curseforge() {
2506
2519
_cf_game_version_id=
2507
2520
_cf_game_version=
2508
2521
local version_name version_id game_id
2509
- for type in " classic" " bcc" " retail" ; do # sort order (last id is show as the version on the project's files page apparently)
2522
+ for type in " classic" " bcc" " wrath " " retail" ; do # sort order (last id is show as the version on the project's files page apparently)
2510
2523
version_name=" ${game_type_version[$type]} "
2511
2524
[[ -z $version_name ]] && continue
2512
2525
case $type in
2513
2526
classic) game_id=67408 ;;
2514
2527
bcc) game_id=73246 ;;
2528
+ wrath) game_id=73713 ;;
2515
2529
* ) game_id=517
2516
2530
esac
2517
2531
@@ -2619,6 +2633,10 @@ upload_wowinterface() {
2619
2633
version=" ${game_type_version[$type]} "
2620
2634
# check the version
2621
2635
if ! jq -e --arg v " $version " ' map(select(.id == $v)) | length > 0' <<< " $_wowi_versions" & > /dev/null; then
2636
+ if [[ $type == " wrath" ]]; then # XXX compat
2637
+ echo " WARNING: Wrath is currently unsupported by WoWInterface, falling back to BCC" >&2
2638
+ version=" 2.5.10"
2639
+ fi
2622
2640
# split out the versions that match the version we're checking against (to keep things more readable)
2623
2641
_wowi_versions_type=$( echo " $_wowi_versions " | jq -c --arg v " $version " ' map(select( (.id | .[:2]) == ($v | .[:2]) ))' )
2624
2642
if [[ $_wowi_versions_type == " []" ]]; then
@@ -2722,8 +2740,11 @@ upload_wago() {
2722
2740
local version wago_type
2723
2741
for type in " ${! game_type_version[@]} " ; do
2724
2742
version=" ${game_type_version[$type]} "
2725
- wago_type=" $type "
2726
- [[ " $wago_type " == " bcc" ]] && wago_type=" bc"
2743
+ case $type in
2744
+ bcc) wago_type=" bc" ;;
2745
+ wrath) wago_type=" wotlk" ;;
2746
+ * ) wago_type=" $type "
2747
+ esac
2727
2748
# check the version
2728
2749
if ! jq -e --arg t " $wago_type " --arg v " $version " ' .[$t] | index($v)' <<< " $_wago_versions" & > /dev/null; then
2729
2750
# no match, so grab the next highest version (try to avoid testing versions)
0 commit comments