RetroDECK/automation_tools/flatpak_build_download_only.sh

44 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
# This script is downloading the needed files to prepare the manifest build
git config --global protocol.file.allow always
if [[ "${GITHUB_REF##*/}" == "main" ]]; then
BUNDLE_NAME="RetroDECK.flatpak"
FOLDER=retrodeck-flatpak
else
BUNDLE_NAME="RetroDECK-cooker.flatpak"
FOLDER=retrodeck-flatpak-cooker
fi
if [ $PERSISTENCE==true ]; then
GITHUB_WORKSPACE_BACKUP="$GITHUB_WORKSPACE"
GITHUB_WORKSPACE="$HOME/cooker-persistent"
2023-12-20 10:17:22 +00:00
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 \
2023-12-20 10:47:25 +00:00
"${GITHUB_WORKSPACE}/${FOLDER}" \
2023-12-20 10:51:37 +00:00
"${GITHUB_WORKSPACE_BACKUP}/net.retrodeck.retrodeck.yml"
GITHUB_WORKSPACE="$GITHUB_WORKSPACE_BACKUP"
2023-12-20 10:17:22 +00:00
else
2023-12-21 10:52:46 +00:00
mkdir -vp "${GITHUB_WORKSPACE}"/{.local,retrodeck-flatpak-cooker}
2023-12-20 10:17:22 +00:00
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