From 5a1d525a2e0bf51db5c2ee6801bd290ce70ea07b Mon Sep 17 00:00:00 2001 From: Kyle Buller Date: Wed, 14 Apr 2021 06:17:20 -0500 Subject: [PATCH] Fix the upload file label logic --- README.md | 8 ++++---- release.sh | 9 +++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e8c487f..c8464df 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/release.sh b/release.sh index bdfbedb..05d5842 100755 --- a/release.sh +++ b/release.sh @@ -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"