From 976e9c385a99f7cb839c505fb857f1eb41a9ee11 Mon Sep 17 00:00:00 2001 From: Zephyron-Dev Date: Sun, 16 Nov 2025 10:55:20 +1000 Subject: [PATCH] Enhance AppImage creation with output logging and renaming Capture the output of the AppImage creation tool and log it for debugging. Automatically find and rename the created AppImage based on the captured output. --- package-citron.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/package-citron.sh b/package-citron.sh index 5cf6d28..0fb03f5 100644 --- a/package-citron.sh +++ b/package-citron.sh @@ -49,12 +49,20 @@ echo "Successfully created $OUTNAME_TAR" wget --retry-connrefused --tries=30 "$URUNTIME" -O ./uruntime2appimage chmod +x ./uruntime2appimage -./uruntime2appimage +# Run the AppImage creation tool and capture its output to a variable. +BUILD_OUTPUT=$(./uruntime2appimage) -echo "Renaming versioned AppImage to the final suffixed name: ${OUTNAME_APPIMAGE}..." +# Print the captured output to the logs for debugging purposes. +echo "$BUILD_OUTPUT" -SOURCE_APPIMAGE="citron_nightly-${APP_VERSION}-${ARCH}.AppImage" +# Automatically find the created AppImage's full path from the output, +# and then use basename to get just the filename. +SOURCE_APPIMAGE=$(basename "$(echo "$BUILD_OUTPUT" | grep "All done! AppImage at:" | awk '{print $NF}')") +echo "Discovered source AppImage: ${SOURCE_APPIMAGE}" +echo "Renaming to final suffixed name: ${OUTNAME_APPIMAGE}..." + +# Now, use the dynamically discovered filename for the move operations. mv -v "${SOURCE_APPIMAGE}" "${OUTNAME_APPIMAGE}" mv -v "${SOURCE_APPIMAGE}.zsync" "${OUTNAME_APPIMAGE}.zsync"