Restore FORGE_INSTALLER (again) using mc-image-helper (#1880)

This commit is contained in:
Geoff Bourne 2023-01-01 09:12:39 -06:00 committed by GitHub
parent c9341ec125
commit 7be36cc2cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,16 +7,31 @@
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
isDebugging && set -x
if ! mc-image-helper install-forge \
--output-directory=/data \
--results-file=/data/.run-forge.env \
--minecraft-version="${VANILLA_VERSION}" \
--forge-version="${FORGE_VERSION}" \
--force-reinstall="${FORGE_FORCE_REINSTALL}"; then
log "ERROR failed to install forge"
exit 1
if [[ ${FORGE_INSTALLER} ]]; then
if ! mc-image-helper install-forge \
--output-directory=/data \
--results-file=/data/.run-forge.env \
--minecraft-version="${VANILLA_VERSION}" \
--forge-installer="${FORGE_INSTALLER}" \
--force-reinstall="${FORGE_FORCE_REINSTALL}"; then
log "ERROR failed to install Forge given installer ${FORGE_INSTALLER}"
exit 1
fi
else
if ! mc-image-helper install-forge \
--output-directory=/data \
--results-file=/data/.run-forge.env \
--minecraft-version="${VANILLA_VERSION}" \
--forge-version="${FORGE_VERSION}" \
--force-reinstall="${FORGE_FORCE_REINSTALL}"; then
log "ERROR failed to install Forge"
exit 1
fi
fi
# grab SERVER and export it
set -a
source /data/.run-forge.env