ForgeAPI fixed lower sub version with a higher ID number (#1451)
Co-authored-by: christopher blodgett <christopher.blodgett@gmail.com>
This commit is contained in:
parent
fc70a976bd
commit
7c7090a582
|
@ -57,7 +57,7 @@ updateReleaseNumber(){
|
|||
}
|
||||
|
||||
retrieveVersionTypeNumber(){
|
||||
VERSION_NAME="Minecraft ${VANILLA_VERSION%.*}"
|
||||
VERSION_NAME="Minecraft ${MAJOR_VANILLA_VERSION}"
|
||||
minecraft_types=$(curl -X GET -s \
|
||||
"${FORGEAPI_BASE_URL}/games/${MINECRAFT_GAME_ID}/version-types" \
|
||||
-H 'Accept: application/json' -H 'x-api-key: '${MODS_FORGEAPI_KEY}'')
|
||||
|
@ -77,7 +77,7 @@ retrieveVersionTypeNumber(){
|
|||
}
|
||||
|
||||
modFileByProjectID(){
|
||||
project_id=$(echo $1 | tr -d '"')
|
||||
project_id=$(echo "$1" | tr -d '"')
|
||||
project_id_release_type=$2
|
||||
project_id_file_name=$3
|
||||
unset PROJECT_FILE
|
||||
|
@ -120,12 +120,12 @@ modFileByProjectID(){
|
|||
.data | map(select(.fileName<=($FILE_NAME))) | .[0] // empty')
|
||||
elif $( ! isTrue "$MODS_FORGEAPI_IGNORE_GAMETYPE" ) && $FILTER_BY_FAMILY ; then
|
||||
# Looks for file by version and server type in lowercase
|
||||
current_project_file=$(jq -n "$project_files" | jq --arg RELEASE_FILTER "$RELEASE_NUMBER_FILTER" --arg GAME_TYPE ${FAMILY,,} -jc '
|
||||
.data | sort_by(.id) | reverse | map(select(.gameVersions[] | ascii_downcase | contains ($GAME_TYPE))) | map(select(.releaseType<=($RELEASE_FILTER|tonumber))) | .[0] // empty')
|
||||
current_project_file=$(jq -n "$project_files" | jq --arg RELEASE_FILTER "$RELEASE_NUMBER_FILTER" --arg GAME_TYPE "${FAMILY,,}" --arg VERSION "$VANILLA_VERSION" -jc '
|
||||
.data | sort_by(.id) | reverse | map(select(.gameVersions[] | ascii_downcase | contains ($GAME_TYPE))) | map(select(.gameVersions[] | contains ($VERSION))) | map(select(.releaseType<=($RELEASE_FILTER|tonumber))) | .[0] // empty')
|
||||
else
|
||||
# Looks for file by version only.
|
||||
current_project_file=$(jq -n "$project_files" | jq --arg RELEASE_FILTER "$RELEASE_NUMBER_FILTER" -jc '
|
||||
.data | sort_by(.id) | reverse | map(select(.releaseType<=($RELEASE_FILTER|tonumber))) | .[0] // empty')
|
||||
current_project_file=$(jq -n "$project_files" | jq --arg RELEASE_FILTER "$RELEASE_NUMBER_FILTER" --arg VERSION "$VANILLA_VERSION" -jc '
|
||||
.data | sort_by(.id) | reverse | map(select(.gameVersions[] | contains ($VERSION))) | map(select(.releaseType<=($RELEASE_FILTER|tonumber))) | .[0] // empty')
|
||||
fi
|
||||
|
||||
# Logic to grab the latest release over the entire pagination
|
||||
|
|
|
@ -16,7 +16,7 @@ services:
|
|||
VERSION: ${MINECRAFT_VERSION:-LATEST}
|
||||
MODS_FORGEAPI_DOWNLOAD_DEPENDENCIES: "TRUE"
|
||||
# Contains mix of Forge and Fabric mods
|
||||
MODS_FORGEAPI_PROJECTIDS: 306612,416089,220318
|
||||
MODS_FORGEAPI_PROJECTIDS: 416089,419697
|
||||
# Allows for Beta releases of 416089 the Fabric Voice Mod
|
||||
MODS_FORGEAPI_RELEASES: BETA
|
||||
MODS_FORGEAPI_KEY: ${MODS_FORGEAPI_KEY}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# No family filter applied, DO NOT use Fabric or Forge specific name validation as it may cause random breakage.
|
||||
mc-image-helper assert fileExists "/data/mods/BiomesOPlenty*"
|
||||
mc-image-helper assert fileExists "/data/mods/TerraBlender*"
|
||||
mc-image-helper assert fileExists "/data/mods/voicechat*"
|
||||
mc-image-helper assert fileExists "/data/mods/voicechat-fabric-1*"
|
||||
# Should be pull v4 and higher for 1.18.2:
|
||||
mc-image-helper assert fileExists "/data/mods/architectury-4*"
|
||||
mc-image-helper assert fileExists "/data/mods/fabric-api*"
|
||||
|
||||
|
|
Loading…
Reference in New Issue