From 679f3be898559b0287ab8cc7b277aaa90b706f8e Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 20 Dec 2023 11:17:22 +0100 Subject: [PATCH] WORKFLOW: fixing persistent build --- .../flatpak_build_download_only.sh | 22 ++++++++++++++----- automation_tools/flatpak_build_only.sh | 5 ++++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/automation_tools/flatpak_build_download_only.sh b/automation_tools/flatpak_build_download_only.sh index 520137a6..1579bee9 100755 --- a/automation_tools/flatpak_build_download_only.sh +++ b/automation_tools/flatpak_build_download_only.sh @@ -13,21 +13,31 @@ else fi if [ $PERSISTENCE==true ]; then - mkdir -p "$HOME/cooker-persistent" GITHUB_WORKSPACE_BACKUP="$GITHUB_WORKSPACE" GITHUB_WORKSPACE="$HOME/cooker-persistent" -fi -mkdir -vp "${GITHUB_WORKSPACE}"/{local,retrodeck-flatpak-cooker} + mkdir -vp "${GITHUB_WORKSPACE}"/{local,retrodeck-flatpak-cooker} -flatpak-builder --user --force-clean \ + flatpak-builder --user --force-clean \ --install-deps-from=flathub \ --install-deps-from=flathub-beta \ --repo="${GITHUB_WORKSPACE}/.local" \ --download-only \ - "${GITHUB_WORKSPACE}/${FOLDER}" \ + "${GITHUB_WORKSPACE_BACKUP}/${FOLDER}" \ net.retrodeck.retrodeck.yml -if [ $PERSISTENCE==true ]; then GITHUB_WORKSPACE="$GITHUB_WORKSPACE_BACKUP" + +else + + mkdir -vp "${GITHUB_WORKSPACE}"/{local,retrodeck-flatpak-cooker} + + flatpak-builder --user --force-clean \ + --install-deps-from=flathub \ + --install-deps-from=flathub-beta \ + --repo="${GITHUB_WORKSPACE}/.local" \ + --download-only \ + "${GITHUB_WORKSPACE}/${FOLDER}" \ + net.retrodeck.retrodeck.yml + fi diff --git a/automation_tools/flatpak_build_only.sh b/automation_tools/flatpak_build_only.sh index b4f61bc5..d32c4609 100755 --- a/automation_tools/flatpak_build_only.sh +++ b/automation_tools/flatpak_build_only.sh @@ -13,10 +13,13 @@ else fi if [ $PERSISTENCE==true ]; then - mkdir -p "$HOME/cooker-persistent" + GITHUB_WORKSPACE_BACKUP="$GITHUB_WORKSPACE" GITHUB_WORKSPACE="$HOME/cooker-persistent" + mkdir -vp ${GITHUB_WORKSPACE}/.local + mkdir -vp ${GITHUB_WORKSPACE}/"$FOLDER" + flatpak-builder --user --force-clean \ --install-deps-from=flathub \ --install-deps-from=flathub-beta \