Skip to content

Commit

Permalink
Include game id in initial CF version check
Browse files Browse the repository at this point in the history
  • Loading branch information
nebularg committed Nov 4, 2022
1 parent 6f66b03 commit 1b6c060
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2539,7 +2539,7 @@ upload_curseforge() {
esac

# check the version
if ! jq -e --arg v "$version_name" 'map(select(.name == $v)) | length > 0' <<< "$_cf_versions" &>/dev/null; then
if ! jq -e --arg v "$version_name" --argjson t "$game_id" 'map(select(.gameVersionTypeID == $t and .name == $v)) | length > 0' <<< "$_cf_versions" &>/dev/null; then
# no match, so grab the next highest version (try to avoid testing versions)
version_name=$( echo "$_cf_versions" | jq -r --arg v "$version_name" --argjson t "$game_id" 'map(select(.gameVersionTypeID == $t and .name < $v)) | max_by(.id) | .name // empty' )
if [[ -z $version_name ]]; then
Expand Down

0 comments on commit 1b6c060

Please sign in to comment.