Skip to content

Commit

Permalink
Update validation for _Classic.toc files
Browse files Browse the repository at this point in the history
Work-around until I rework the naming logic to Classic -> Any classic,
Vanilla -> Classic Era.
  • Loading branch information
nebularg committed May 11, 2024
1 parent 07a3e3c commit d0ccf80
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1162,8 +1162,20 @@ set_info_toc_interface() {
fi
local toc_file_game_type="${game_flavor[${BASH_REMATCH[1],,}]}"
if [[ $toc_file_game_type != "$toc_game_type" ]]; then
echo "$toc_name has an interface version ($toc_version) that is not compatible with the game version \"${toc_file_game_type}\"." >&2
exit 1
if [[ $toc_file_game_type == "classic" && -z $toc_game_type ]]; then
# New loading logic for _Classic
IFS=':' read -ra V <<< "$toc_version"
for i in "${V[@]}"; do
toc_to_type "$i" "toc_file_game_type"
if [[ $toc_file_game_type == "retail" ]]; then
echo "$toc_name has an interface version ($i) that is not compatible with the game version \"classic\"." >&2
exit 1
fi
done
else
echo "$toc_name has an interface version ($toc_version) that is not compatible with the game version \"${toc_file_game_type}\"." >&2
exit 1
fi
fi
else
# Fallback
Expand Down

0 comments on commit d0ccf80

Please sign in to comment.