fix docker-compose.yml generation
All checks were successful
/ release-and-build (push) Successful in 41s
All checks were successful
/ release-and-build (push) Successful in 41s
This commit is contained in:
@@ -327,15 +327,21 @@ jobs:
|
||||
line="${line//__HISTORY_CONTENT__/$HISTORY_CONTENT}"
|
||||
line="${line//__DOCKER_RUN__/$DOCKER_RUN_FINAL}"
|
||||
|
||||
# 2. Block Injection (Das fehlte!)
|
||||
# 2. Block Injection (Jetzt sicher gegen Abstürze bei leeren Variablen)
|
||||
if [[ "$line" == *"__ENV_BLOCK__"* ]]; then
|
||||
[ -n "$ENV_BLOCK_CONTENT" ] && echo -e "${ENV_BLOCK_CONTENT}" >> "$output"
|
||||
if [ -n "$ENV_BLOCK_CONTENT" ]; then
|
||||
echo -e "${ENV_BLOCK_CONTENT}" >> "$output"
|
||||
fi
|
||||
elif [[ "$line" == *"__PORTS_BLOCK__"* ]]; then
|
||||
[ -n "$PORTS_BLOCK_CONTENT" ] && echo -e "${PORTS_BLOCK_CONTENT}" >> "$output"
|
||||
if [ -n "$PORTS_BLOCK_CONTENT" ]; then
|
||||
echo -e "${PORTS_BLOCK_CONTENT}" >> "$output"
|
||||
fi
|
||||
elif [[ "$line" == *"__VOL_BLOCK__"* ]]; then
|
||||
[ -n "$VOL_BLOCK_CONTENT" ] && echo -e "${VOL_BLOCK_CONTENT}" >> "$output"
|
||||
if [ -n "$VOL_BLOCK_CONTENT" ]; then
|
||||
echo -e "${VOL_BLOCK_CONTENT}" >> "$output"
|
||||
fi
|
||||
else
|
||||
# Wenn kein Block-Platzhalter, schreibe die normale (ersetzte) Zeile
|
||||
# Wenn kein Block-Platzhalter, schreibe die normale Zeile
|
||||
echo "$line" >> "$output"
|
||||
fi
|
||||
done < "$template"
|
||||
|
||||
Reference in New Issue
Block a user