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
/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
run: |
git config --global protocol.file.allow always

View file

@ -53,11 +53,6 @@ jobs:
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
- 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
id: read_manifest
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
# ACTION^PLACEHOLDERTEXT^URL^REPO(Optional)
branch^THISBRANCH
# 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^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
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 "Automation task list location: $automation_task_list"
@ -23,10 +24,17 @@ echo "Task list contents:"
cat "$automation_task_list"
echo
# Update all collected information
while IFS="^" read -r action placeholder url branch
do
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 "Placeholder text: $placeholder"
echo "URL to hash: $url"