Cooker version automation

This commit is contained in:
icenine451 2023-08-25 09:59:31 -04:00
parent 1293940f78
commit 2437d5c489
4 changed files with 11 additions and 12 deletions

View file

@ -62,11 +62,6 @@ jobs:
runtime/org.freedesktop.Platform.ffmpeg-full/x86_64/22.08 runtime/org.freedesktop.Platform.ffmpeg-full/x86_64/22.08
/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh # Run pre-build automation tasks /bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh # Run pre-build automation tasks
- name: Setting branch in the manifest
run: |
sed -i "s/THISBRANCH/$(git rev-parse --abbrev-ref HEAD)/g" net.retrodeck.retrodeck.yml
echo "Branch name is: $(git rev-parse --abbrev-ref HEAD)"
- name: Build flatpak - name: Build flatpak
run: | run: |
git config --global protocol.file.allow always git config --global protocol.file.allow always
@ -117,4 +112,4 @@ jobs:
with: with:
name: retrodeck-flatpak name: retrodeck-flatpak
path: RetroDECK.flatpak path: RetroDECK.flatpak
continue-on-error: true continue-on-error: true

View file

@ -53,11 +53,6 @@ jobs:
runtime/org.freedesktop.Platform.ffmpeg-full/x86_64/22.08 runtime/org.freedesktop.Platform.ffmpeg-full/x86_64/22.08
/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh # Run pre-build automation tasks /bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh # Run pre-build automation tasks
- name: Setting branch in the manifest
run: |
sed -i "s/branch: THISBRANCH/branch: $(git rev-parse --abbrev-ref HEAD)/g" net.retrodeck.retrodeck.yml
echo "Branch name is: $(git rev-parse --abbrev-ref HEAD)"
- name: Read manifest content - name: Read manifest content
id: read_manifest id: read_manifest
run: echo "::set-output name=file_content::$(cat net.retrodeck.retrodeck.yml)" run: echo "::set-output name=file_content::$(cat net.retrodeck.retrodeck.yml)"

View file

@ -1,5 +1,6 @@
# The proper format for this file is # The proper format for this file is
# ACTION^PLACEHOLDERTEXT^URL^REPO(Optional) # ACTION^PLACEHOLDERTEXT^URL^REPO(Optional)
branch^THISBRANCH
# hash^DOOMSHAPLACEHOLDER^https://buildbot.libretro.com/assets/cores/DOOM/Doom%20%28Shareware%29.zip # hash^DOOMSHAPLACEHOLDER^https://buildbot.libretro.com/assets/cores/DOOM/Doom%20%28Shareware%29.zip
hash^VITASHAPLACEHOLDER^https://github.com/Vita3K/Vita3K/releases/download/continuous/ubuntu-latest.zip hash^VITASHAPLACEHOLDER^https://github.com/Vita3K/Vita3K/releases/download/continuous/ubuntu-latest.zip
hash^DUCKSTATIONSHAPLACEHOLDER^https://github.com/stenzek/duckstation/releases/download/preview/DuckStation-x64.AppImage hash^DUCKSTATIONSHAPLACEHOLDER^https://github.com/stenzek/duckstation/releases/download/preview/DuckStation-x64.AppImage

View file

@ -15,6 +15,7 @@
rd_manifest=${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml rd_manifest=${GITHUB_WORKSPACE}/net.retrodeck.retrodeck.yml
automation_task_list=${GITHUB_WORKSPACE}/automation_tools/automation_task_list.cfg automation_task_list=${GITHUB_WORKSPACE}/automation_tools/automation_task_list.cfg
current_branch=$(git rev-parse --abbrev-ref HEAD)
echo "Manifest location: $rd_manifest" echo "Manifest location: $rd_manifest"
echo "Automation task list location: $automation_task_list" echo "Automation task list location: $automation_task_list"
@ -23,10 +24,17 @@ echo "Task list contents:"
cat "$automation_task_list" cat "$automation_task_list"
echo echo
# Update all collected information
while IFS="^" read -r action placeholder url branch while IFS="^" read -r action placeholder url branch
do do
if [[ ! $action == "#"* ]] && [[ ! -z "$action" ]]; then if [[ ! $action == "#"* ]] && [[ ! -z "$action" ]]; then
if [[ "$action" == "hash" ]]; then if [[ "$action" == "branch" ]]; then
echo
echo "Placeholder text: $placeholder"
echo "Current branch:" "$current_branch"
echo
/bin/sed -i 's^'"$placeholder"'^'"$current_branch"'^g' $rd_manifest
elif [[ "$action" == "hash" ]]; then
echo echo
echo "Placeholder text: $placeholder" echo "Placeholder text: $placeholder"
echo "URL to hash: $url" echo "URL to hash: $url"