Skip to content

Commit f595d97

Browse files
committed
11111111
1 parent 621320d commit f595d97

1 file changed

Lines changed: 20 additions & 25 deletions

File tree

.github/workflows/automatic_image_genration.yml

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -183,33 +183,32 @@ jobs:
183183
echo ""
184184
echo "🖼️ Generating PNG for: $file"
185185
186-
java -jar /tmp/plantuml.jar -tpng -nometadata -scale 4 "$file" -o "$output_abs" || echo " WARNING: PNG generation command may have failed for $file (Exit Code: $?)" >&2
186+
java -jar /tmp/plantuml.jar -tpng -nometadata -scale 4 "$file" || echo " WARNING: PNG generation command may have failed for $file (Exit Code: $?)" >&2
187187
188188
png_exit_code=$?
189-
# Logdatei anzeigen
190-
echo "📋 PlantUML Log Output:"
191-
cat /tmp/plantuml-svg.log 2>/dev/null | sed 's/^/ | /' || echo " | No log output available"
192-
193189
echo "📊 PNG generation exit code: $png_exit_code"
194190
if [ -n "$png_exit_code" ] && [ "$png_exit_code" -ne 0 ]; then
195191
echo "❌ PNG generation failed!"
196192
else
197193
echo "✅ PNG generation command completed"
198194
fi
199195
196+
ls
197+
200198
# Rename with prefix
201-
if [ -f "$output_abs/${base}.png" ]; then
202-
mv "$output_abs/${base}.png" "$output_abs/${prefix_base}.png"
203-
echo "✅ Renamed PNG: $output_abs/${prefix_base}.png"
204-
else
205-
echo "❌ Original PNG not found: $output_abs/${base}.png"
199+
generated_file=(`find ./ -maxdepth 1 -name "*.png"`)
200+
if [ -f "$generated_file" ]; then
201+
mv "$generated_file" "${output_abs}/${prefix_base}.png"
202+
echo "✅ Renamed PNG: ${output_abs}/${prefix_base}.png"
203+
else}
204+
echo "❌ Original PNG not found: ${output_abs}/${base}.png"
206205
fi
207206
208207
# Check for PNG files
209-
if [ -f "$output_abs/${prefix_base}.png" ]; then
210-
echo "✅ Generated PNG: $output_abs/${prefix_base}.png"
208+
if [ -f "${output_abs}/${prefix_base}.png" ]; then
209+
echo "✅ Generated PNG: ${output_abs}/${prefix_base}.png"
211210
else
212-
echo "❌ Expected PNG not found: $output_abs/${prefix_base}.png"
211+
echo "❌ Expected PNG not found: ${output_abs}/${prefix_base}.png"
213212
fi
214213
215214
# Generate SVG with full debugging
@@ -218,11 +217,7 @@ jobs:
218217
219218
java -jar /tmp/plantuml.jar -tsvg -nometadata "$file" -o "$output_abs" || echo " WARNING: SVG generation command may have failed for $file (Exit Code: $?)" >&2
220219
221-
svg_exit_code=$?
222-
# Logdatei anzeigen
223-
echo "📋 PlantUML Log Output:"
224-
cat /tmp/plantuml-svg.log 2>/dev/null | sed 's/^/ | /' || echo " | No log output available"
225-
220+
svg_exit_code=$?
226221
echo "📊 SVG generation exit code: $svg_exit_code"
227222
if [ -n "$svg_exit_code" ] && [ "$svg_exit_code" -ne 0 ]; then
228223
echo "❌ SVG generation failed!"
@@ -231,18 +226,18 @@ jobs:
231226
fi
232227
233228
# Rename with prefix
234-
if [ -f "$output_abs/${base}.svg" ]; then
235-
mv "$output_abs/${base}.svg" "$output_abs/${prefix_base}.svg"
236-
echo "✅ Renamed SVG: $output_abs/${prefix_base}.svg"
229+
if [ -f "${output_abs}/${base}.svg" ]; then
230+
mv "${output_abs}/${base}.svg" "${output_abs}/${prefix_base}.svg"
231+
echo "✅ Renamed SVG: ${output_abs}/${prefix_base}.svg"
237232
else
238-
echo "❌ Original SVG not found: $output_abs/${base}.svg"
233+
echo "❌ Original SVG not found: ${output_abs}/${base}.svg"
239234
fi
240235
241236
# Check for SVG files
242-
if [ -f "$output_abs/${prefix_base}.svg" ]; then
243-
echo "✅ Generated SVG: $output_abs/${prefix_base}.svg"
237+
if [ -f "${output_abs}/${prefix_base}.svg" ]; then
238+
echo "✅ Generated SVG: ${output_abs}/${prefix_base}.svg"
244239
else
245-
echo "❌ Expected SVG not found: $output_abs/${prefix_base}.svg"
240+
echo "❌ Expected SVG not found: ${output_abs}/${prefix_base}.svg"
246241
fi
247242
248243
echo "📁 Final output directory state:"

0 commit comments

Comments
 (0)