Skip to content

Commit ae90180

Browse files
committed
Change game type from "bc" to "bcc"
1 parent 778602f commit ae90180

File tree

2 files changed

+35
-23
lines changed

2 files changed

+35
-23
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Supported keywords and when the code block will run:
131131
file.
132132
- `no-lib-strip`: _(not supported in Lua files)_ in any build other than a
133133
*nolib* build.
134-
- `retail`,`version-retail`,`version-classic`,`version-bc`: based on game
134+
- `retail`,`version-retail`,`version-classic`,`version-bcc`: based on game
135135
version.
136136

137137
`do-not-package` is a bit special. Everything between the tags, including the
@@ -204,8 +204,8 @@ on the build type:
204204

205205
`{classic}` has some additional magic:
206206

207-
1. It will show as the non-retail build type, so either `-classic` or `-bc`.
208-
2. It will not be shown if "-classic" or "-bc" is in the project version.
207+
1. It will show as the non-retail build type, so either `-classic` or `-bcc`.
208+
2. It will not be shown if "-classic" or "-bcc" is in the project version.
209209
3. If it is included in the file name (it is by default) and #2 does not apply,
210210
it will also be appended to the file label (i.e., the name shown on
211211
CurseForge).
@@ -225,7 +225,7 @@ version.
225225
## Interface: 90005
226226
## Interface-Retail: 90005
227227
## Interface-Classic: 11306
228-
## Interface-BC: 20501
228+
## Interface-BCC: 20501
229229
```
230230

231231
You specify what version of the game you're targeting with the `-g` switch. You

release.sh

+31-19
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if [[ ${BASH_VERSINFO[0]} -lt 4 ]] || [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VER
6666
fi
6767

6868
# Game versions for uploading
69-
declare -A game_flavors=( ["retail"]="mainline" ["classic"]="classic" ["bc"]="bcc" )
69+
declare -A game_flavors=( ["retail"]="mainline" ["classic"]="classic" ["bcc"]="bcc" )
7070
declare -A game_versions
7171
toc_version=
7272

@@ -86,7 +86,7 @@ escape_substr() {
8686
filename_filter() {
8787
local classic alpha beta invalid
8888
[ -n "$skip_invalid" ] && invalid="&" || invalid="_"
89-
if [[ "$game_type" != "retail" ]] && [[ "$game_type" != "classic" || "${si_project_version,,}" != *"-classic"* ]] && [[ "$game_type" != "bc" || "${si_project_version,,}" != *"-bc"* ]]; then
89+
if [[ "$game_type" != "retail" ]] && [[ "$game_type" != "classic" || "${si_project_version,,}" != *"-classic"* ]] && [[ "$game_type" != "bcc" || "${si_project_version,,}" != *"-bcc"* ]]; then
9090
# only append the game type if the tag doesn't include it
9191
classic="-$game_type"
9292
fi
@@ -184,9 +184,17 @@ while getopts ":celLzusop:dw:a:r:t:g:m:n:" opt; do
184184
g) # Set the game type or version
185185
OPTARG="${OPTARG,,}"
186186
case "$OPTARG" in
187-
retail|classic|bc) game_type="$OPTARG" ;; # game_version from toc
187+
retail|classic|bcc) game_type="$OPTARG" ;; # game_version from toc
188188
mainline) game_type="retail" ;;
189-
bcc) game_type="bc" ;;
189+
bc)
190+
echo "Invalid argument for option \"-g\" ($OPTARG)" >&2
191+
echo "" >&2
192+
echo "The \"bc\" game type has been changed to \"bcc\" to match Blizzard." >&2
193+
echo "This affects TOC interface lines (Interface-BC -> Interface-BCC) and" >&2
194+
echo "build keywords (version-bc -> version-bcc)." >&2
195+
echo "" >&2
196+
exit 1
197+
;;
190198
*)
191199
# Set game version (x.y.z)
192200
# Build game type set from the last value if a list
@@ -200,7 +208,7 @@ while getopts ":celLzusop:dw:a:r:t:g:m:n:" opt; do
200208
if [[ ${BASH_REMATCH[1]} == "1" && ${BASH_REMATCH[2]} == "13" ]]; then
201209
game_type="classic"
202210
elif [[ ${BASH_REMATCH[1]} == "2" && ${BASH_REMATCH[2]} == "5" ]]; then
203-
game_type="bc"
211+
game_type="bcc"
204212
else
205213
game_type="retail"
206214
fi
@@ -972,7 +980,7 @@ if [[ -n "$toc_version" && -z "$game_type" ]]; then
972980
# toc -> game type
973981
case $toc_version in
974982
113*) game_type="classic" ;;
975-
205*) game_type="bc" ;;
983+
205*) game_type="bcc" ;;
976984
*) game_type="retail"
977985
esac
978986
else
@@ -988,15 +996,15 @@ else
988996
# Check for other interface lines
989997
if [[ -z "$toc_version" ]] || \
990998
[[ "$game_type" == "classic" && "$toc_version" != "113"* ]] || \
991-
[[ "$game_type" == "bc" && "$toc_version" != "205"* ]] || \
999+
[[ "$game_type" == "bcc" && "$toc_version" != "205"* ]] || \
9921000
[[ "$game_type" == "retail" && ("$toc_version" == "113"* || "$toc_version" == "205"*) ]]
9931001
then
9941002
toc_version="$game_type_toc_version"
9951003
if [[ -z "$toc_version" ]]; then
9961004
# Check @non-@ blocks
9971005
case $game_type in
9981006
classic) toc_version=$( sed -n '/@non-[-a-z]*@/,/@end-non-[-a-z]*@/{//b;p}' <<< "$toc_file" | awk '/#[[:blank:]]*## Interface:[[:blank:]]*(113)/ { print $NF; exit }' ) ;;
999-
bc) toc_version=$( sed -n '/@non-[-a-z]*@/,/@end-non-[-a-z]*@/{//b;p}' <<< "$toc_file" | awk '/#[[:blank:]]*## Interface:[[:blank:]]*(205)/ { print $NF; exit }' ) ;;
1007+
bcc) toc_version=$( sed -n '/@non-[-a-z]*@/,/@end-non-[-a-z]*@/{//b;p}' <<< "$toc_file" | awk '/#[[:blank:]]*## Interface:[[:blank:]]*(205)/ { print $NF; exit }' ) ;;
10001008
esac
10011009
# This becomes the actual interface version after string replacements
10021010
root_toc_version="$toc_version"
@@ -1457,11 +1465,11 @@ copy_directory_tree() {
14571465
if [ -n "$_cdt_classic" ]; then
14581466
_cdt_filters+="|lua_filter retail"
14591467
_cdt_filters+="|lua_filter version-retail"
1460-
[ "$_cdt_classic" = "classic" ] && _cdt_filters+="|lua_filter version-bc"
1461-
[ "$_cdt_classic" = "bc" ] && _cdt_filters+="|lua_filter version-classic"
1468+
[ "$_cdt_classic" = "classic" ] && _cdt_filters+="|lua_filter version-bcc"
1469+
[ "$_cdt_classic" = "bcc" ] && _cdt_filters+="|lua_filter version-classic"
14621470
else
14631471
_cdt_filters+="|lua_filter version-classic"
1464-
_cdt_filters+="|lua_filter version-bc"
1472+
_cdt_filters+="|lua_filter version-bcc"
14651473
fi
14661474
[ -n "$_cdt_localization" ] && _cdt_filters+="|localization_filter"
14671475
;;
@@ -1473,11 +1481,11 @@ copy_directory_tree() {
14731481
if [ -n "$_cdt_classic" ]; then
14741482
_cdt_filters+="|xml_filter retail"
14751483
_cdt_filters+="|xml_filter version-retail"
1476-
[ "$_cdt_classic" = "classic" ] && _cdt_filters+="|xml_filter version-bc"
1477-
[ "$_cdt_classic" = "bc" ] && _cdt_filters+="|xml_filter version-classic"
1484+
[ "$_cdt_classic" = "classic" ] && _cdt_filters+="|xml_filter version-bcc"
1485+
[ "$_cdt_classic" = "bcc" ] && _cdt_filters+="|xml_filter version-classic"
14781486
else
14791487
_cdt_filters+="|xml_filter version-classic"
1480-
_cdt_filters+="|xml_filter version-bc"
1488+
_cdt_filters+="|xml_filter version-bcc"
14811489
fi
14821490
;;
14831491
*.toc)
@@ -1487,8 +1495,8 @@ copy_directory_tree() {
14871495
_cdt_filters+="|toc_filter debug ${_cdt_debug}"
14881496
_cdt_filters+="|toc_filter retail ${_cdt_classic:+true}"
14891497
_cdt_filters+="|toc_filter version-retail ${_cdt_classic:+true}"
1490-
_cdt_filters+="|toc_filter version-classic $([[ -z "$_cdt_classic" || "$_cdt_classic" == "bc" ]] && echo "true")"
1491-
_cdt_filters+="|toc_filter version-bc $([[ -z "$_cdt_classic" || "$_cdt_classic" == "classic" ]] && echo "true")"
1498+
_cdt_filters+="|toc_filter version-classic $([[ -z "$_cdt_classic" || "$_cdt_classic" == "bcc" ]] && echo "true")"
1499+
_cdt_filters+="|toc_filter version-bcc $([[ -z "$_cdt_classic" || "$_cdt_classic" == "classic" ]] && echo "true")"
14921500
_cdt_filters+="|toc_interface_filter"
14931501
[ -n "$_cdt_localization" ] && _cdt_filters+="|localization_filter"
14941502
;;
@@ -2154,7 +2162,7 @@ if [ -z "$skip_zipfile" ]; then
21542162
if [[ "${file_name}" == *"{game-type}"* ]] || [[ "$game_type" != "retail" && "${file_name}" == *"{classic}"* ]]; then
21552163
# append the game-type for clarity
21562164
archive_label="$archive_version-$game_type"
2157-
if [[ "$game_type" == "classic" && "${project_version,,}" == *"-classic"* ]] || [[ "$game_type" == "bc" && "${project_version,,}" == *"-bc"* ]]; then
2165+
if [[ "$game_type" == "classic" && "${project_version,,}" == *"-classic"* ]] || [[ "$game_type" == "bcc" && "${project_version,,}" == *"-bcc"* ]]; then
21582166
# this is mostly for BigWigs projects that tag classic separately (eg, v10-classic)
21592167
# to prevent the extra -classic without changing all our workflows
21602168
archive_label="$archive_version"
@@ -2255,7 +2263,7 @@ if [ -z "$skip_zipfile" ]; then
22552263
case $game_type in
22562264
retail) _cf_game_type_id=517 ;;
22572265
classic) _cf_game_type_id=67408 ;;
2258-
bc) _cf_game_type_id=73246 ;;
2266+
bcc) _cf_game_type_id=73246 ;;
22592267
esac
22602268
_cf_game_version_id=$( echo "$_cf_versions" | jq -c --argjson v "$_cf_game_type_id" 'map(select(.gameVersionTypeID == $v)) | max_by(.id) | [.id]' 2>/dev/null )
22612269
_cf_game_version=$( echo "$_cf_versions" | jq -r --argjson v "$_cf_game_type_id" 'map(select(.gameVersionTypeID == $v)) | max_by(.id) | .name' 2>/dev/null )
@@ -2420,7 +2428,11 @@ if [ -z "$skip_zipfile" ]; then
24202428
if [ -n "$upload_wago" ] ; then
24212429
_wago_support_property=""
24222430
for type in "${!game_versions[@]}"; do
2423-
_wago_support_property+="\"supported_${type}_patch\": \"${game_versions[$type]}\", "
2431+
if [[ "$type" == "bcc" ]]; then
2432+
_wago_support_property+="\"supported_bc_patch\": \"${game_versions[$type]}\", "
2433+
else
2434+
_wago_support_property+="\"supported_${type}_patch\": \"${game_versions[$type]}\", "
2435+
fi
24242436
done
24252437

24262438
_wago_stability="$file_type"

0 commit comments

Comments
 (0)