File suffix support for CF_API_KEY (#3489)

This commit is contained in:
Byron Collins
2025-06-05 21:35:26 +09:00
committed by GitHub
parent 0ba63777a3
commit f84171dca2
9 changed files with 67 additions and 2 deletions

View File

@@ -11,8 +11,19 @@ set -e -o pipefail
: "${PLUGINS_FILE:=}"
: "${REMOVE_OLD_MODS_DEPTH:=1} "
: "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}"
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
sum_file=/data/.generic_pack.sum
if [[ -n ${CF_API_KEY_FILE} ]]; then
if [[ -r "${CF_API_KEY_FILE}" ]]; then
CF_API_KEY="$(cat "${CF_API_KEY_FILE}")"
export CF_API_KEY
else
logError "CF_API_KEY_FILE is not readable: ${CF_API_KEY_FILE}"
exit 1
fi
fi
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x