RetroDECK/automation_tools/flatpak_build_download_only.sh

34 lines
936 B
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
# Getting token from env
TOKEN=$GITHUB_TOKEN
export GIT_CURL_VERBOSE=1
export GIT_ASKPASS=echo
export GIT_USERNAME=token
export GIT_PASSWORD=$TOKEN
sed -i "s|Authorization: token .*|Authorization: token ${TOKEN}|" "${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml"
if [[ "${GITHUB_REF##*/}" == "main" ]]; then
BUNDLE_NAME="RetroDECK.flatpak"
FOLDER=retrodeck-flatpak
else
BUNDLE_NAME="RetroDECK-cooker.flatpak"
FOLDER=retrodeck-flatpak-cooker
fi
2024-07-12 08:02:56 +00:00
mkdir -vp "${GITHUB_WORKSPACE}"/{retrodeck-repo,retrodeck-flatpak-cooker}
2023-12-21 12:43:35 +00:00
flatpak-builder --user --force-clean \
--install-deps-from=flathub \
--install-deps-from=flathub-beta \
2024-07-12 08:02:56 +00:00
--repo="${GITHUB_WORKSPACE}/retrodeck-repo" \
--download-only \
2023-12-20 10:47:25 +00:00
"${GITHUB_WORKSPACE}/${FOLDER}" \
2023-12-21 12:43:35 +00:00
net.retrodeck.retrodeck.yml