@@ -75,7 +75,7 @@ if [[ ${BASH_VERSINFO[0]} -lt 4 ]] || [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VER
75
75
fi
76
76
77
77
# Game versions for uploading
78
- declare -A game_flavor=( [" retail" ]=" retail" [" classic" ]=" classic" [" bcc" ]=" bcc" [" mainline" ]=" retail" [" tbc" ]=" bcc" [" vanilla" ]=" classic" [" wrath" ]=" wrath" [" wotlkc" ]=" wrath" [" cata" ]=" cata" )
78
+ declare -A game_flavor=( [" retail" ]=" retail" [" classic" ]=" classic" [" bcc" ]=" bcc" [" mainline" ]=" retail" [" tbc" ]=" bcc" [" vanilla" ]=" classic" [" wrath" ]=" wrath" [" wotlkc" ]=" wrath" [" cata" ]=" cata" [ " mists " ]= " mists " )
79
79
80
80
declare -A game_type_version=() # type -> version (: delim)
81
81
declare -A game_type_interface=() # type -> toc (: delim)
@@ -123,7 +123,8 @@ filename_filter() {
123
123
[[ " $game_type " != " classic" || " ${si_project_version,,} " != * " -classic" * ]] && \
124
124
[[ " $game_type " != " bcc" || " ${si_project_version,,} " != * " -bcc" * ]] && \
125
125
[[ " $game_type " != " wrath" || " ${si_project_version,,} " != * " -wrath" * ]] && \
126
- [[ " $game_type " != " cata" || " ${si_project_version,,} " != * " -cata" * ]]
126
+ [[ " $game_type " != " cata" || " ${si_project_version,,} " != * " -cata" * ]] && \
127
+ [[ " $game_type " != " mists" || " ${si_project_version,,} " != * " -mists" * ]]
127
128
then
128
129
# only append the game type if the tag doesn't include it
129
130
classic=" -$game_type "
@@ -175,6 +176,7 @@ toc_to_type() {
175
176
20??? ) game_type=" bcc" ;;
176
177
30??? ) game_type=" wrath" ;;
177
178
40??? ) game_type=" cata" ;;
179
+ 50??? ) game_type=" mists" ;;
178
180
* ) game_type=" retail"
179
181
esac
180
182
# return game_type
@@ -249,7 +251,7 @@ while getopts ":celLzusSop:dw:a:r:t:g:m:n:" opt; do
249
251
g) # Set the game type or version
250
252
OPTARG=" ${OPTARG,,} "
251
253
case " $OPTARG " in
252
- retail|classic|bcc|wrath|cata) game_type=" $OPTARG " ;; # game_version from toc
254
+ retail|classic|bcc|wrath|cata|mists ) game_type=" $OPTARG " ;; # game_version from toc
253
255
mainline) game_type=" retail" ;;
254
256
* )
255
257
# Set game version (x.y.z)
@@ -269,6 +271,8 @@ while getopts ":celLzusSop:dw:a:r:t:g:m:n:" opt; do
269
271
game_type=" wrath"
270
272
elif [[ ${BASH_REMATCH[1]} == " 4" ]]; then
271
273
game_type=" cata"
274
+ elif [[ ${BASH_REMATCH[1]} == " 5" ]]; then
275
+ game_type=" mists"
272
276
else
273
277
game_type=" retail"
274
278
fi
@@ -1154,7 +1158,7 @@ set_info_toc_interface() {
1154
1158
si_game_root_interface=" $toc_version "
1155
1159
fi
1156
1160
1157
- if [[ ${toc_name} =~ " $package_name " [-_](Mainline| Classic| Vanilla| BCC| TBC| Wrath| WOTLKC| Cata)\. toc$ ]]; then
1161
+ if [[ ${toc_name} =~ " $package_name " [-_](Mainline| Classic| Vanilla| BCC| TBC| Wrath| WOTLKC| Cata| Mists )\. toc$ ]]; then
1158
1162
# Flavored, just validate the version
1159
1163
if [[ -z $toc_version ]]; then
1160
1164
echo " $toc_name is missing an interface version." >&2
@@ -1217,6 +1221,7 @@ set_info_toc_interface() {
1217
1221
bcc) game_type_toc_prefix=" 20" ;;
1218
1222
wrath) game_type_toc_prefix=" 30" ;;
1219
1223
cata) game_type_toc_prefix=" 40" ;;
1224
+ mists) game_type_toc_prefix=" 50" ;;
1220
1225
* ) game_type_toc_prefix=
1221
1226
esac
1222
1227
if [[ -n $game_type_toc_prefix ]]; then
@@ -1323,14 +1328,14 @@ if [[ -z "$package" ]]; then
1323
1328
exit 1
1324
1329
fi
1325
1330
package=${package% .toc}
1326
- if [[ $package =~ ^(.* )([-_](Mainline| Classic| Vanilla| BCC| TBC| Wrath| WOTLKC| Cata))$ ]]; then
1331
+ if [[ $package =~ ^(.* )([-_](Mainline| Classic| Vanilla| BCC| TBC| Wrath| WOTLKC| Cata| Mists ))$ ]]; then
1327
1332
echo " Ambiguous addon name. No fallback TOC file or addon name includes an expansion suffix (${BASH_REMATCH[2]} ). Set 'package-as' in .pkgmeta" >&2
1328
1333
exit 1
1329
1334
fi
1330
1335
fi
1331
1336
1332
1337
# Parse the project root TOC files for info first
1333
- for toc_path in " $topdir /$package " {,-Mainline,_Mainline,-Classic,_Classic,-Vanilla,_Vanilla,-BCC,_BCC,-TBC,_TBC,-Wrath,_Wrath,-WOTLKC,_WOTLKC,-Cata,_Cata}.toc; do
1338
+ for toc_path in " $topdir /$package " {,-Mainline,_Mainline,-Classic,_Classic,-Vanilla,_Vanilla,-BCC,_BCC,-TBC,_TBC,-Wrath,_Wrath,-WOTLKC,_WOTLKC,-Cata,_Cata,-Mists,_Mists }.toc; do
1334
1339
if [[ -f " $toc_path " ]]; then
1335
1340
set_toc_project_info " $toc_path "
1336
1341
toc_paths+=(" $toc_path " )
@@ -1340,7 +1345,7 @@ done
1340
1345
# Try parsing the project addon in move-folders for info next
1341
1346
for path in " ${! toc_root_paths[@]} " ; do
1342
1347
if [[ ${toc_root_paths[$path]} == " $package " && $path != " $topdir " ]]; then
1343
- for toc_path in " $path /$package " {,-Mainline,_Mainline,-Classic,_Classic,-Vanilla,_Vanilla,-BCC,_BCC,-TBC,_TBC,-Wrath,_Wrath,-WOTLKC,_WOTLKC,-Cata,_Cata}.toc; do
1348
+ for toc_path in " $path /$package " {,-Mainline,_Mainline,-Classic,_Classic,-Vanilla,_Vanilla,-BCC,_BCC,-TBC,_TBC,-Wrath,_Wrath,-WOTLKC,_WOTLKC,-Cata,_Cata,-Mists,_Mists }.toc; do
1344
1349
if [[ -f " $toc_path " ]]; then
1345
1350
set_toc_project_info " $toc_path "
1346
1351
fi
@@ -1350,7 +1355,7 @@ done
1350
1355
1351
1356
# Parse project TOC files
1352
1357
for path in " ${! toc_root_paths[@]} " ; do
1353
- for toc_path in " $path /${toc_root_paths[$path]} " {,-Mainline,_Mainline,-Classic,_Classic,-Vanilla,_Vanilla,-BCC,_BCC,-TBC,_TBC,-Wrath,_Wrath,-WOTLKC,_WOTLKC,-Cata,_Cata}.toc; do
1358
+ for toc_path in " $path /${toc_root_paths[$path]} " {,-Mainline,_Mainline,-Classic,_Classic,-Vanilla,_Vanilla,-BCC,_BCC,-TBC,_TBC,-Wrath,_Wrath,-WOTLKC,_WOTLKC,-Cata,_Cata,-Mists,_Mists }.toc; do
1354
1359
if [[ -f " $toc_path " ]]; then
1355
1360
set_toc_project_info " $toc_path "
1356
1361
set_info_toc_interface " $toc_path " " ${toc_root_paths[$path]} "
@@ -1824,6 +1829,7 @@ copy_directory_tree() {
1824
1829
[[ $_cdt_file_gametype != " bcc" ]] && _cdt_filters+=" |lua_filter version-bcc"
1825
1830
[[ $_cdt_file_gametype != " wrath" ]] && _cdt_filters+=" |lua_filter version-wrath"
1826
1831
[[ $_cdt_file_gametype != " cata" ]] && _cdt_filters+=" |lua_filter version-cata"
1832
+ [[ $_cdt_file_gametype != " mists" ]] && _cdt_filters+=" |lua_filter version-mists"
1827
1833
fi
1828
1834
[[ -n $_cdt_localization ]] && grep -q " @localization" " $_cdt_source_file " && _cdt_filters+=" |localization_filter"
1829
1835
;;
@@ -1838,6 +1844,7 @@ copy_directory_tree() {
1838
1844
[[ $_cdt_file_gametype != " bcc" ]] && _cdt_filters+=" |xml_filter version-bcc"
1839
1845
[[ $_cdt_file_gametype != " wrath" ]] && _cdt_filters+=" |xml_filter version-wrath"
1840
1846
[[ $_cdt_file_gametype != " cata" ]] && _cdt_filters+=" |xml_filter version-cata"
1847
+ [[ $_cdt_file_gametype != " mists" ]] && _cdt_filters+=" |xml_filter version-mists"
1841
1848
fi
1842
1849
;;
1843
1850
* .toc)
@@ -1863,6 +1870,7 @@ copy_directory_tree() {
1863
1870
_cdt_filters+=" |toc_filter version-bcc $( [[ " $_cdt_file_gametype " != " bcc" ]] && echo " true" ) "
1864
1871
_cdt_filters+=" |toc_filter version-wrath $( [[ " $_cdt_file_gametype " != " wrath" ]] && echo " true" ) "
1865
1872
_cdt_filters+=" |toc_filter version-cata $( [[ " $_cdt_file_gametype " != " cata" ]] && echo " true" ) "
1873
+ _cdt_filters+=" |toc_filter version-mists $( [[ " $_cdt_file_gametype " != " mists" ]] && echo " true" ) "
1866
1874
fi
1867
1875
# Rewrite the interface line if necessary
1868
1876
_cdt_filters+=" |toc_interface_filter '${si_game_type_interface_all[${_cdt_file_gametype:- }]} ' '${toc_root_interface["$_cdt_source_file"]} '"
@@ -1881,10 +1889,10 @@ copy_directory_tree() {
1881
1889
echo " Copying: $file ${_cdt_external_slug: + (embedded: " $_cdt_external_slug " )} "
1882
1890
1883
1891
# Make sure we're not causing any surprises
1884
- if [[ -z $_cdt_file_gametype && ( $file == * " .lua" || $file == * " .xml" || ( -z $_cdt_external && $file == * " .toc" ) ) ]] && grep -q ' @\(non-\)\?version-\(retail\|classic\|vanilla\|bcc\|wrath\|cata\)@' " $_cdt_source_file " ; then
1892
+ if [[ -z $_cdt_file_gametype && ( $file == * " .lua" || $file == * " .xml" || ( -z $_cdt_external && $file == * " .toc" ) ) ]] && grep -q ' @\(non-\)\?version-\(retail\|classic\|vanilla\|bcc\|wrath\|cata\|mists\ )@' " $_cdt_source_file " ; then
1885
1893
echo " Error! Build type version keywords are not allowed in a multi-version build." >&2
1886
1894
echo " These should be replaced with lua conditional statements:" >&2
1887
- grep -n ' @\(non-\)\?version-\(retail\|classic\|vanilla\|bcc\|wrath\|cata\)@' " $_cdt_source_file " | sed ' s/^/ /' >&2
1895
+ grep -n ' @\(non-\)\?version-\(retail\|classic\|vanilla\|bcc\|wrath\|cata\|mists\ )@' " $_cdt_source_file " | sed ' s/^/ /' >&2
1888
1896
echo " See https://wowpedia.fandom.com/wiki/WOW_PROJECT_ID" >&2
1889
1897
exit 1
1890
1898
fi
@@ -1905,6 +1913,7 @@ copy_directory_tree() {
1905
1913
bcc) new_file+=" _TBC.toc" ;;
1906
1914
wrath) new_file+=" _Wrath.toc" ;;
1907
1915
cata) new_file+=" _Cata.toc" ;;
1916
+ mists) new_file+=" _Mists.toc" ;;
1908
1917
esac
1909
1918
1910
1919
echo " Creating $new_file [${toc_version//:/ , } ]"
@@ -1921,6 +1930,7 @@ copy_directory_tree() {
1921
1930
_cdt_filters+=" |toc_filter version-bcc $( [[ " $type " != " bcc" ]] && echo " true" ) "
1922
1931
_cdt_filters+=" |toc_filter version-wrath $( [[ " $type " != " wrath" ]] && echo " true" ) "
1923
1932
_cdt_filters+=" |toc_filter version-cata $( [[ " $type " != " cata" ]] && echo " true" ) "
1933
+ _cdt_filters+=" |toc_filter version-mists $( [[ " $type " != " mists" ]] && echo " true" ) "
1924
1934
_cdt_filters+=" |toc_interface_filter '$toc_version ' '$root_toc_version '"
1925
1935
_cdt_filters+=" |line_ending_filter"
1926
1936
@@ -2742,6 +2752,7 @@ upload_curseforge() {
2742
2752
bcc) game_id=73246 ;;
2743
2753
wrath) game_id=73713 ;;
2744
2754
cata) game_id=77522 ;;
2755
+ mists) game_id=79434 ;;
2745
2756
* ) game_id=517
2746
2757
esac
2747
2758
IFS=' :' read -ra V <<< " ${game_type_version[$type]}"
@@ -2860,6 +2871,7 @@ upload_wowinterface() {
2860
2871
bcc) wowi_type=" TBC-Classic" ;;
2861
2872
wrath) wowi_type=" WOTLK-Classic" ;;
2862
2873
cata) wowi_type=" Cata-Classic" ;;
2874
+ mists) wowi_type=" MOP-Classic" ;; # XXX nyi
2863
2875
* ) wowi_type=" Retail"
2864
2876
esac
2865
2877
IFS=' :' read -ra V <<< " ${game_type_version[$type]}"
@@ -2870,6 +2882,9 @@ upload_wowinterface() {
2870
2882
# use the next highest version (try to avoid testing versions)
2871
2883
version=$( echo " $_wowi_versions " | jq -r --arg v " $invalid_version " --arg t " $wowi_type " ' map(select(.game == $t and .id < $v)) | max_by(.id) | .id // empty' )
2872
2884
if [[ -z $version ]]; then
2885
+ if [[ $wowi_type == " MOP-Classic" ]]; then # XXX compat: not supported yet or I guessed the wrong name
2886
+ wowi_type=" Cata-Classic"
2887
+ fi
2873
2888
# just grab the highest version
2874
2889
version=$( echo " $_wowi_versions " | jq -r --arg t " $wowi_type " ' map(select(.game == $t)) | max_by(.id) | .id // empty' )
2875
2890
fi
@@ -2970,6 +2985,7 @@ upload_wago() {
2970
2985
case $type in
2971
2986
bcc) wago_type=" bc" ;;
2972
2987
wrath) wago_type=" wotlk" ;;
2988
+ mists) wago_type=" mop" ;;
2973
2989
* ) wago_type=" $type "
2974
2990
esac
2975
2991
wago_game_type_version=
0 commit comments