Skip to content

Commit

Permalink
[GitHub Actions] Flatpak: Check staged screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Dec 8, 2023
1 parent 5b10de2 commit 5351666
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .ci/flatpak/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ test -f "${WZ_FLATPAK_BUILD_PATH}/app-info/icons/flatpak/128x128/${WZ_FLATPAK_AP
test -f "${WZ_FLATPAK_BUILD_PATH}/app-info/xmls/${WZ_FLATPAK_APPID}.xml.gz" || { echo "Missing ${WZ_FLATPAK_APPID}.xml.gz in app-info" ; exit 1; }
echo "::endgroup::"

echo "::group::Check screenshots"
if [ ! -d "${WZ_FLATPAK_BUILD_DIR}/screenshots" ]; then
echo "::notice ::Screenshots not mirrored by flatpak-builder? - Copying manually"
WZ_FLATPAK_SCREENSHOTS_PATH="${WZ_FLATPAK_BUILD_PATH}/app-info/media"
find "${WZ_FLATPAK_SCREENSHOTS_PATH}" -type f
mkdir -p "${WZ_FLATPAK_BUILD_DIR}/screenshots"
cp "${WZ_FLATPAK_SCREENSHOTS_PATH}/*.png" "${WZ_FLATPAK_BUILD_DIR}/screenshots/"
else
echo "Found screenshots:"
find "${WZ_FLATPAK_BUILD_DIR}/screenshots" -type f
fi
echo "::endgroup::"

echo "::group::Commit screenshots to the OSTree repository"
ostree commit --repo=${WZ_FLATPAK_LOCAL_REPO_NAME} --canonical-permissions --branch=screenshots/${WZ_FLATPAK_TARGET_ARCH} "${WZ_FLATPAK_BUILD_DIR}/screenshots"
echo "::endgroup::"

0 comments on commit 5351666

Please sign in to comment.