Consider MODRINTH_PROJECTS_DEFAULT_VERSION_TYPE as part of VERSION_FROM_MODRINTH_PROJECTS (#3985)

This commit is contained in:
Geoff Bourne
2026-03-22 19:52:07 -05:00
committed by GitHub
parent 387c674849
commit 3cd3656868
2 changed files with 6 additions and 2 deletions

View File

@@ -156,7 +156,11 @@ export DECLARED_TYPE=${TYPE^^}
export DECLARED_VERSION="$VERSION"
if isTrue "${VERSION_FROM_MODRINTH_PROJECTS:-}" && [[ ${MODRINTH_PROJECTS:-} ]]; then
if ! VERSION=$(mc-image-helper version-from-modrinth-projects --projects "${MODRINTH_PROJECTS}"); then
args=()
if [[ ${MODRINTH_PROJECTS_DEFAULT_VERSION_TYPE:-} ]]; then
args+=(--allowed-version-type "${MODRINTH_PROJECTS_DEFAULT_VERSION_TYPE:-}")
fi
if ! VERSION=$(mc-image-helper version-from-modrinth-projects "${args[@]}" --projects "${MODRINTH_PROJECTS}"); then
logError "failed to resolve version from MODRINTH_PROJECTS: ${MODRINTH_PROJECTS}"
exit 1
fi