From 4a5eb169f4e8957404521d5e2b05c4783910aca3 Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Tue, 12 Nov 2024 16:30:59 -0300 Subject: [PATCH] DEbug --- .github/workflows/cmake.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8a26b6ba..59a7b49a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -44,11 +44,16 @@ jobs: submodules: "recursive" - name: Set branch name for thirdparty download - id: tp-branch + id: branch-name run: | - current_branch=$(git -C SuperGenius rev-parse --abbrev-ref HEAD) + if ${{github.event_name == 'pull_request'}}; then + current_branch=${{ github.event.pull_request.head.ref }} + else + current_branch=$GITHUB_REF_NAME + fi + + echo "Identified current branch as ${current_branch}" - # Check if the branch exists in the thirdparty repository if git ls-remote --heads https://github.com/GeniusVentures/thirdparty.git $current_branch | grep -q $current_branch; then echo "Using same branch for thirdparty" thirdparty_branch=${current_branch} @@ -58,6 +63,7 @@ jobs: fi echo "THIRDPARTY_BRANCH=$thirdparty_branch" >>$GITHUB_OUTPUT + echo "SGNS_BRANCH=$current_branch" >>$GITHUB_OUTPUT shell: bash - name: Download thirdparty release @@ -66,7 +72,7 @@ jobs: mkdir thirdparty cd thirdparty - tag_name=${{matrix.target}}-${{steps.tp-branch.outputs.THIRDPARTY_BRANCH}}-Release + tag_name=${{matrix.target}}-${{steps.branch-name.outputs.THIRDPARTY_BRANCH}}-Release gh release download ${tag_name} --repo GeniusVentures/thirdparty -p "*-lib.tar.gz" @@ -177,7 +183,7 @@ jobs: cd ${{matrix.target}} rm -rf !(Release) .[!.]* ..?* cd Release - if [[ "${{matrix.target == 'Android'}}"]]; then + if ${{matrix.target == 'Android'}}; then rm -rf !(${{matrix.abi}}) .[!.]* ..?* cd ${{matrix.abi}} fi @@ -196,7 +202,7 @@ jobs: OS_NAME=${{matrix.target}} fi - branch_name=${GITHUB_REF#refs/heads/} + branch_name=${{steps.branch-name.outputs.SGNS_BRANCH}} build_type=Release file_name="${OS_NAME}-${branch_name}-${build_type}.tar.gz"