From 03fc1ce56ac11c567744cfb94623d15445636161 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 30 Aug 2023 16:16:20 +0200 Subject: [PATCH 1/5] pipelines: moved the branch checking from the pipeline to the automation tool --- .github/workflows/cooker-selfhosted.yml | 5 ----- .github/workflows/main-selfhosted.yml | 7 +------ automation_tools/automation_task_list.cfg | 1 + 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 61a1cdd9..fc1cd535 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -54,11 +54,6 @@ jobs: - name: Run pre-build automation tasks run : "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh" - - name: Set 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: download only" id: "flatpak-download" run: | diff --git a/.github/workflows/main-selfhosted.yml b/.github/workflows/main-selfhosted.yml index 34e5392a..5d9e8d3d 100644 --- a/.github/workflows/main-selfhosted.yml +++ b/.github/workflows/main-selfhosted.yml @@ -43,11 +43,6 @@ jobs: - name: Run pre-build automation tasks run : "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh" - - name: Set 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)" @@ -55,7 +50,7 @@ jobs: - name: Check VERSION id: check_version_string run: | - if [[ "${{ steps.read_file.outputs.file_content }}" == *"VERSION=THISBRANCH"* ]]; then + if [[ "${{ steps.read_file.outputs.file_content }}" == *"VERSION=THISBRANCH"* ]] || [[ "${{ steps.read_file.outputs.file_content }}" == *"VERSION=main"* ]]; then echo "Version string is present, proceeding." else echo "Error: You forgot to specify the version." diff --git a/automation_tools/automation_task_list.cfg b/automation_tools/automation_task_list.cfg index f1624f43..a34f3878 100644 --- a/automation_tools/automation_task_list.cfg +++ b/automation_tools/automation_task_list.cfg @@ -9,3 +9,4 @@ hash^MSXBIOSHASHPLACEHOLDER^http://bluemsx.msxblue.com/rel_download/blueMSXv282f hash^XEMUHDDHASHPLACEHOLDER^https://github.com/mborgerson/xemu-hdd-image/releases/latest/download/xbox_hdd.qcow2.zip latestcommit^UNIVERSALDYNAMICINPUTCOMMITPLACEHOLDER^https://github.com/Venomalia/UniversalDynamicInput^main outside_info^VERSIONPLACEHOLDER^${GITHUB_WORKSPACE}/buildid +outside_info^THISBRANCH^$(git rev-parse --abbrev-ref HEAD) From 16fe569c204b9e681c853f15c55ec7cc069eecb1 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 30 Aug 2023 16:16:44 +0200 Subject: [PATCH 2/5] Updated release comments on manifest --- net.retrodeck.retrodeck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 8c201fb1..ad873521 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -66,15 +66,15 @@ modules: # The version number is hardcoded in /app/retrodeck/version # # UPDATE STEPS FOR MAIN: - # [ ] Update the VERSION variable + # [ ] Update the VERSION variable on line containing "VERSION=THISBRANCH" # [ ] Update the appdata.xml with the version number and notes - # [ ] if header (before modules) was edited, edit it even in flathub.yml # - name: version-initialization buildsystem: simple build-commands: - | + # on main please update this with the version variable, eg: VERSION='0.7.0b' VERSION=THISBRANCH git checkout ${GITHUB_REF_NAME} From 64c147374f68033c3e88716aa8e146745bb581b6 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 30 Aug 2023 17:18:22 +0200 Subject: [PATCH 3/5] Wrong substitution? --- automation_tools/automation_task_list.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation_tools/automation_task_list.cfg b/automation_tools/automation_task_list.cfg index a34f3878..15506a58 100644 --- a/automation_tools/automation_task_list.cfg +++ b/automation_tools/automation_task_list.cfg @@ -9,4 +9,4 @@ hash^MSXBIOSHASHPLACEHOLDER^http://bluemsx.msxblue.com/rel_download/blueMSXv282f hash^XEMUHDDHASHPLACEHOLDER^https://github.com/mborgerson/xemu-hdd-image/releases/latest/download/xbox_hdd.qcow2.zip latestcommit^UNIVERSALDYNAMICINPUTCOMMITPLACEHOLDER^https://github.com/Venomalia/UniversalDynamicInput^main outside_info^VERSIONPLACEHOLDER^${GITHUB_WORKSPACE}/buildid -outside_info^THISBRANCH^$(git rev-parse --abbrev-ref HEAD) +outside_info^THISBRANCH^"$(git rev-parse --abbrev-ref HEAD)" From fa21df195cd4d5a5f53aa126ebb347d21c2cb224 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 30 Aug 2023 17:20:28 +0200 Subject: [PATCH 4/5] Some folder were excluded from the build triggering --- .github/workflows/cooker-selfhosted.yml | 2 ++ .github/workflows/main-selfhosted.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index fc1cd535..7a59bb0f 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -6,8 +6,10 @@ on: - cooker* paths: - '.github/workflows/**' + - 'automation_tools' - 'emu-configs/**' - 'es-configs/**' + - 'functions' - 'rd-submodules/**' - '*.sh' - 'net.retrodeck.retrodeck.yml' diff --git a/.github/workflows/main-selfhosted.yml b/.github/workflows/main-selfhosted.yml index 5d9e8d3d..4588bb81 100644 --- a/.github/workflows/main-selfhosted.yml +++ b/.github/workflows/main-selfhosted.yml @@ -6,8 +6,10 @@ on: - main paths: - '.github/workflows/**' + - 'automation_tools' - 'emu-configs/**' - 'es-configs/**' + - 'functions' - 'rd-submodules/**' - '*.sh' - 'net.retrodeck.retrodeck.yml' From 88996afd085afbea527d01cc82aa6dc69106a715 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 30 Aug 2023 17:26:16 +0200 Subject: [PATCH 5/5] pipeline: wrong substitution in autmation tools, falling back to the old method --- .github/workflows/cooker-selfhosted.yml | 6 ++++++ .github/workflows/main-selfhosted.yml | 6 ++++++ automation_tools/automation_task_list.cfg | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 7a59bb0f..1a3dca3b 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -56,6 +56,12 @@ jobs: - name: Run pre-build automation tasks run : "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh" + # remove me when the automations tool substitution can do this + - name: Set 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: download only" id: "flatpak-download" run: | diff --git a/.github/workflows/main-selfhosted.yml b/.github/workflows/main-selfhosted.yml index 4588bb81..420a8895 100644 --- a/.github/workflows/main-selfhosted.yml +++ b/.github/workflows/main-selfhosted.yml @@ -45,6 +45,12 @@ jobs: - name: Run pre-build automation tasks run : "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh" + # remove me when the automations tool substitution can do this + - name: Set 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: Read manifest content id: read_manifest run: echo "::set-output name=file_content::$(cat net.retrodeck.retrodeck.yml)" diff --git a/automation_tools/automation_task_list.cfg b/automation_tools/automation_task_list.cfg index 15506a58..74f9aae2 100644 --- a/automation_tools/automation_task_list.cfg +++ b/automation_tools/automation_task_list.cfg @@ -9,4 +9,4 @@ hash^MSXBIOSHASHPLACEHOLDER^http://bluemsx.msxblue.com/rel_download/blueMSXv282f hash^XEMUHDDHASHPLACEHOLDER^https://github.com/mborgerson/xemu-hdd-image/releases/latest/download/xbox_hdd.qcow2.zip latestcommit^UNIVERSALDYNAMICINPUTCOMMITPLACEHOLDER^https://github.com/Venomalia/UniversalDynamicInput^main outside_info^VERSIONPLACEHOLDER^${GITHUB_WORKSPACE}/buildid -outside_info^THISBRANCH^"$(git rev-parse --abbrev-ref HEAD)" +#outside_info^THISBRANCH^"$(git rev-parse --abbrev-ref HEAD)"