Skip to content

Commit

Permalink
Fix the upload file label logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nebularg committed Apr 14, 2021
1 parent e4d57a2 commit 5a1d525
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ on the build type:
`{classic}` has some additional magic:

1. It will show as the non-retail build type, so either `-classic` or `-bc`.
2. It will not be shown if "classic" (case insensitive) is in the project
version.
3. If it is included in the file name and #2 does not apply, it will also be
appended to the file label (i.e., the name shown).
2. It will not be shown if "-classic" or "-bc" is in the project version.
3. If it is included in the file name (it is by default) and #2 does not apply,
it will also be appended to the file label (i.e., the name shown on
CurseForge).

## Building for multiple game versions

Expand Down
9 changes: 7 additions & 2 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2154,9 +2154,14 @@ if [ -z "$skip_zipfile" ]; then
archive_version="$project_version"
archive_name="$( filename_filter "$file_name" ).zip"
archive_label="$archive_version"
if [[ "$game_type" != "retail" && "${project_version,,}" != *"classic"* && "$file_name" == *"{classic}"* ]]; then
# append it for clarity
if [[ "${file_name}" == *"{game-type}"* ]] || [[ "$game_type" != "retail" && "${file_name}" == *"{classic}"* ]]; then
# append the game-type for clarity
archive_label="$archive_version-$game_type"
if [[ "$game_type" == "classic" && "${project_version,,}" == *"-classic"* ]] || [[ "$game_type" == "bc" && "${project_version,,}" == *"-bc"* ]]; then
# this is mostly for BigWigs projects that tag classic separately (eg, v10-classic)
# to prevent the extra -classic without changing all our workflows
archive_label="$archive_version"
fi
fi
archive="$releasedir/$archive_name"

Expand Down

0 comments on commit 5a1d525

Please sign in to comment.