Update scripts/scheduler/entrypoint.sh
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
hael
2025-07-21 10:41:29 +00:00
parent 415d65ac1c
commit 279c886c07

View File

@@ -798,11 +798,12 @@ execute_task() {
elif [ "$TASK_NAME" == "deployments" ]; then elif [ "$TASK_NAME" == "deployments" ]; then
DEPLOYMENTS="" DEPLOYMENTS=""
TREES=$(get_repositories) TREES=$(get_repositories)
for TREE in $TREES; do for TREE in "$TREES"; do
APPS=$(jq -rc '.apps[]' $TREE) APPS=$(jq -rc '.apps[]' $TREE)
for APP in $APPS; do #for APP in "$APPS"; do #space problem
while IFS= read -r APP; do
APP_NAME=$(echo "$APP" | jq -r '.name') APP_NAME=$(echo "$APP" | jq -r '.name')
APP_SUBTITLE=$(echo "$APP" | jq -r '.subtitle') APP_SUBTITLE="$(echo "$APP" | jq -r '.subtitle')"
APP_VERSION=$(echo "$APP" | jq -r '.version') APP_VERSION=$(echo "$APP" | jq -r '.version')
APP_ICON=$(echo "$APP" | jq -r '.icon') APP_ICON=$(echo "$APP" | jq -r '.icon')
if [ "$DEPLOYMENTS" != "" ]; then if [ "$DEPLOYMENTS" != "" ]; then
@@ -810,8 +811,9 @@ execute_task() {
else else
SEP="" SEP=""
fi fi
DEPLOYMENTS=$DEPLOYMENTS$SEP'"'$APP_NAME'": {"subtitle": "'$APP_SUBTITLE'", "version": "'$APP_VERSION'", "icon": "'$APP_ICON'"}' DEPLOYMENTS="$DEPLOYMENTS"$SEP'"'$APP_NAME'": {"subtitle": "'"$APP_SUBTITLE"'", "version": "'"$APP_VERSION"'", "icon":
done "'"$APP_ICON"'"}'
done < <(echo "$APPS") # preserve DEPLOYMENTS variable
done done
if [ "$DEPLOYMENTS" == "" ]; then if [ "$DEPLOYMENTS" == "" ]; then
DEPLOYMENTS='"deployments": "NONE"' DEPLOYMENTS='"deployments": "NONE"'