2023-09-26 07:20:19 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# This script is downloading the needed files to prepare the manifest build
|
|
|
|
|
|
|
|
git config --global protocol.file.allow always
|
2023-09-30 09:02:35 +00:00
|
|
|
|
2023-10-14 19:20:33 +00:00
|
|
|
if [[ "${GITHUB_REF##*/}" == "main" ]]; then
|
2023-09-30 09:02:35 +00:00
|
|
|
BUNDLE_NAME="RetroDECK.flatpak"
|
2023-11-30 15:15:31 +00:00
|
|
|
FOLDER=retrodeck-flatpak
|
2023-09-30 09:02:35 +00:00
|
|
|
else
|
|
|
|
BUNDLE_NAME="RetroDECK-cooker.flatpak"
|
|
|
|
FOLDER=retrodeck-flatpak-cooker
|
|
|
|
fi
|
|
|
|
|
2023-12-20 09:06:21 +00:00
|
|
|
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}
|
2023-09-30 09:02:35 +00:00
|
|
|
|
2023-12-20 22:33:51 +00:00
|
|
|
flatpak-builder --user --force-clean \
|
2023-09-26 07:20:19 +00:00
|
|
|
--install-deps-from=flathub \
|
|
|
|
--install-deps-from=flathub-beta \
|
2023-11-30 16:04:21 +00:00
|
|
|
--repo="${GITHUB_WORKSPACE}/.local" \
|
2023-09-26 07:20:19 +00:00
|
|
|
--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"
|
2023-12-20 09:06:21 +00:00
|
|
|
|
|
|
|
GITHUB_WORKSPACE="$GITHUB_WORKSPACE_BACKUP"
|
2023-12-20 10:17:22 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2023-12-20 09:06:21 +00:00
|
|
|
fi
|