From 6a93bc3e76ea8f9008dd2c8513ac7a6bdb30be1b Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Fri, 8 Dec 2023 14:30:39 -0500 Subject: [PATCH] [GitHub Actions] Flatpak: Check staged screenshots --- .ci/flatpak/build.sh | 15 ++++++++++++++- .github/workflows/CI_flatpak.yml | 10 +++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.ci/flatpak/build.sh b/.ci/flatpak/build.sh index 1bd8ecd2d61..29841a8113f 100755 --- a/.ci/flatpak/build.sh +++ b/.ci/flatpak/build.sh @@ -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?" +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" +if [ -d "${WZ_FLATPAK_BUILD_DIR}/screenshots" ]; then + ostree commit --repo=${WZ_FLATPAK_LOCAL_REPO_NAME} --canonical-permissions --branch=screenshots/${WZ_FLATPAK_TARGET_ARCH} "${WZ_FLATPAK_BUILD_DIR}/screenshots" +else + echo "::warning ::Screenshots not added to OSTree repository" +fi echo "::endgroup::" diff --git a/.github/workflows/CI_flatpak.yml b/.github/workflows/CI_flatpak.yml index 208d27ff99a..d75c67df8b1 100644 --- a/.github/workflows/CI_flatpak.yml +++ b/.github/workflows/CI_flatpak.yml @@ -226,6 +226,11 @@ jobs: . src/.ci/flatpak/build.sh echo "WZ_FLATPAK_LOCAL_REPO_NAME=${WZ_FLATPAK_LOCAL_REPO_NAME}" echo "WZ_FLATPAK_LOCAL_REPO_NAME=${WZ_FLATPAK_LOCAL_REPO_NAME}" >> $GITHUB_OUTPUT + - name: Output generated files listing + shell: bash + working-directory: flatpak_app/files + run: | + find . -type f - name: Lint Flatpak continue-on-error: true env: @@ -245,11 +250,6 @@ jobs: with: name: 'warzone2100_linux_flatpak_${{ matrix.arch }}' path: ${{ steps.settings.outputs.WZ_FLATPAK_BUNDLE }} - - name: Output generated files listing - shell: bash - working-directory: flatpak_app/files - run: | - find . -type f - name: Upload debug info uses: actions/upload-artifact@v3 with: