mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-29 09:05:42 +00:00
Merge branch 'cooker' into feat/PortMaster
This commit is contained in:
commit
74614923f0
23
.github/workflows/cooker-selfhosted.yml
vendored
23
.github/workflows/cooker-selfhosted.yml
vendored
|
@ -15,7 +15,7 @@ on:
|
|||
- '*.sh'
|
||||
- 'net.retrodeck.retrodeck.yml'
|
||||
- 'net.retrodeck.retrodeck.appdata.xml'
|
||||
pull_request_target:
|
||||
pull_request:
|
||||
branches:
|
||||
- cooker*
|
||||
|
||||
|
@ -37,7 +37,9 @@ jobs:
|
|||
|
||||
# Circumventing this bug: https://github.com/flatpak/flatpak-builder/issues/317
|
||||
- name: Remove stuck mounts
|
||||
run: sudo umount -f /home/ubuntu/actions-runner/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/*
|
||||
run: |
|
||||
sudo umount -f /home/ubuntu/actions-runner/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/*
|
||||
sudo umount -f $HOME/actions-run/_work/RetroDECK/RetroDECK/.flatpak-builder/rofiles/*
|
||||
continue-on-error: true
|
||||
|
||||
- name: Generate a token for Rekku
|
||||
|
@ -81,14 +83,19 @@ jobs:
|
|||
|
||||
# Check if the event is related to a pull request
|
||||
if [[ "$GITHUB_EVENT_NAME" == "pull_request" || "$GITHUB_EVENT_NAME" == "pull_request_target" ]]; then
|
||||
pr_number=$(echo "$GITHUB_REF" | awk -F'/' '{print $3}')
|
||||
source_branch=$(curl -s "https://api.github.com/repos/RetroDECK/RetroDECK/pulls/$pr_number" | jq -r '.head.ref')
|
||||
source_branch=${source_branch//\//-} # Replace '/' with '-' in the branch name
|
||||
# Use GITHUB_HEAD_REF to get the source branch
|
||||
source_branch="${GITHUB_HEAD_REF}"
|
||||
|
||||
# Replace '/' with '-' in the branch name
|
||||
source_branch=${source_branch//\//-}
|
||||
echo "[DEBUG] source branch is: $source_branch"
|
||||
echo "TAG=PR-$pr_number-$(echo $source_branch-${{ env.buildid }} | sed 's/\//-/g')" >> $GITHUB_ENV
|
||||
echo "MAKE_LATEST=false" >> $GITHUB_ENV # if it's a feature branch it will not marked as "latest" cooker version
|
||||
|
||||
# Generate the tag for a pull request
|
||||
echo "TAG=PR-$GITHUB_RUN_ID-$source_branch-${{ env.buildid }}" >> $GITHUB_ENV
|
||||
echo "MAKE_LATEST=false" >> $GITHUB_ENV # Not marked as the latest cooker version if it's a feature branch
|
||||
else
|
||||
TAG="$MANIFEST_VERSION-${{ env.buildid }} | sed 's/\//-/g'"
|
||||
# Generate the tag for non-pull request branches
|
||||
TAG="$MANIFEST_VERSION-${{ env.buildid }}"
|
||||
echo "TAG=$TAG" >> $GITHUB_ENV
|
||||
echo "MAKE_LATEST=true" >> $GITHUB_ENV
|
||||
fi
|
||||
|
|
|
@ -5,10 +5,6 @@ check_bios_files() {
|
|||
# There is a "basic" and "expert" mode which outputs different levels of data
|
||||
# USAGE: check_bios_files "mode"
|
||||
|
||||
if [[ -f "$godot_bios_files_checked" ]]; then
|
||||
rm -f "$godot_bios_files_checked" # Godot data transfer temp files
|
||||
fi
|
||||
touch "$godot_bios_files_checked"
|
||||
|
||||
while IFS="^" read -r bios_file bios_subdir bios_hash bios_system bios_desc || [[ -n "$bios_file" ]];
|
||||
do
|
||||
|
@ -25,10 +21,10 @@ check_bios_files() {
|
|||
fi
|
||||
if [[ "$1" == "basic" ]]; then
|
||||
bios_checked_list=("${bios_checked_list[@]}" "$bios_file" "$bios_system" "$bios_file_found" "$bios_hash_matched" "$bios_desc")
|
||||
echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc" >> "$godot_bios_files_checked" # Godot data transfer temp file
|
||||
echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc" # Godot data transfer
|
||||
else
|
||||
bios_checked_list=("${bios_checked_list[@]}" "$bios_file" "$bios_system" "$bios_file_found" "$bios_hash_matched" "$bios_desc" "$bios_subdir" "$bios_hash")
|
||||
echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc"^"$bios_subdir"^"$bios_hash" >> "$godot_bios_files_checked" # Godot data transfer temp file
|
||||
echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc"^"$bios_subdir"^"$bios_hash" # Godot data transfer
|
||||
fi
|
||||
fi
|
||||
done < $bios_checklist
|
||||
|
|
|
@ -45,7 +45,7 @@ remote_network_target_2="$rd_repo"
|
|||
remote_network_target_3="https://one.one.one.one" # The URL of a common internet target for testing network access
|
||||
helper_files_folder="$config/retrodeck/helper_files" # The parent folder of RetroDECK documentation files for deployment
|
||||
rd_appdata="/app/share/appdata/net.retrodeck.retrodeck.appdata.xml" # The shipped appdata XML file for this version
|
||||
rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2023_0228_05fe32f5dc8c78acbcd84d36ee7fdc5b/PS3UPDAT.PUP"
|
||||
rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2024_0227_3694eb3fb8d9915c112e6ab41a60c69f/PS3UPDAT.PUP"
|
||||
RA_API_URL="https://retroachievements.org/dorequest.php" # API URL for RetroAchievements.org
|
||||
presets_dir="$config/retrodeck/presets" # Repository for all system preset config files
|
||||
git_organization_name="RetroDECK" # The name of the organization in our git repository such as GitHub
|
||||
|
|
|
@ -374,6 +374,61 @@ post_update() {
|
|||
fi
|
||||
fi
|
||||
|
||||
# Check if the version is older than 0.8.4b
|
||||
if [[ $(check_version_is_older_than "0.8.4b") == "true" ]]; then
|
||||
# In version 0.8.4b, the following changes were made:
|
||||
# - Recovery from a failed move of the themes, downloaded_media and gamelists folder to their new ES-DE locations (AGAIN)
|
||||
|
||||
log d "Injecting the new retrodeck/ES-DE subdir into the retrodeck.cfg"
|
||||
# Check if ES-DE already exists in media_folder or themes_folder
|
||||
if grep -E '^(media_folder|themes_folder)=.*ES-DE' "$rd_conf"; then
|
||||
log d "ES-DE path already exists in media_folder or themes_folder"
|
||||
else
|
||||
# Update the paths if ES-DE does not exist
|
||||
sed -i -e '/media_folder=/s|retrodeck/|retrodeck/ES-DE/|g' -e '/themes_folder=/s|retrodeck/|retrodeck/ES-DE/|g' "$rd_conf" && log d "Injection successful"
|
||||
fi
|
||||
log d "$(grep media_folder "$rd_conf")"
|
||||
log d "$(grep themes_folder "$rd_conf")"
|
||||
conf_read
|
||||
conf_write
|
||||
|
||||
log i "Checking if ES-DE downloaded_media, gamelist, and themes folder must be migrated from \"$rdhome\" to \"$rdhome/ES-DE\" due to a RetroDECK Framework bug"
|
||||
|
||||
# Use rsync to merge directories and overwrite existing files
|
||||
if [[ -d "$rdhome/themes" ]]; then
|
||||
rsync -a "$rdhome/themes/" "$rdhome/ES-DE/themes/" && log d "Move of \"$rdhome/themes\" to \"$rdhome/ES-DE/themes\" completed"
|
||||
rm -rf "$rdhome/themes" # Remove the original directory after merging
|
||||
else
|
||||
log i "ES-DE themes appear to have already been migrated."
|
||||
fi
|
||||
|
||||
if [[ -d "$rdhome/downloaded_media" ]]; then
|
||||
rsync -a "$rdhome/downloaded_media/" "$rdhome/ES-DE/downloaded_media/" && log d "Move of \"$rdhome/downloaded_media\" to \"$rdhome/ES-DE/downloaded_media\" completed"
|
||||
rm -rf "$rdhome/downloaded_media" # Remove the original directory after merging
|
||||
else
|
||||
log i "ES-DE downloaded media appear to have already been migrated."
|
||||
fi
|
||||
|
||||
if [[ -d "$rdhome/gamelists" ]]; then
|
||||
rsync -a "$rdhome/gamelists/" "$rdhome/ES-DE/gamelists/" && log d "Move of \"$rdhome/gamelists\" to \"$rdhome/ES-DE/gamelists\" completed"
|
||||
rm -rf "$rdhome/gamelists" # Remove the original directory after merging
|
||||
else
|
||||
log i "ES-DE gamelists appear to have already been migrated."
|
||||
fi
|
||||
|
||||
if [[ -d "$rdhome/collections" ]]; then
|
||||
rsync -a "$rdhome/collections/" "$rdhome/ES-DE/collections/" && log d "Move of \"$rdhome/collections\" to \"$rdhome/ES-DE/collections\" completed"
|
||||
rm -rf "$rdhome/collections" # Remove the original directory after merging
|
||||
else
|
||||
log i "ES-DE collections appear to have already been migrated."
|
||||
fi
|
||||
|
||||
# Setting the correct variables once again
|
||||
set_setting_value "$es_settings" "MediaDirectory" "$media_folder" "es_settings"
|
||||
set_setting_value "$es_settings" "UserThemeDirectory" "$themes_folder" "es_settings"
|
||||
|
||||
fi
|
||||
|
||||
if [[ $(check_version_is_older_than "0.9.0b") == "true" ]]; then
|
||||
# Placeholder for version 0.9.0b
|
||||
|
||||
|
|
Loading…
Reference in a new issue