1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-12 10:03:53 +02:00

Simplify cpack logic

This commit is contained in:
Ivan Savenko 2024-09-06 16:59:31 +00:00
parent 2506490db4
commit a63d3a11c4

View File

@ -261,11 +261,13 @@ jobs:
if: ${{ matrix.pack == 1 }}
run: |
cd '${{github.workspace}}/out/build/${{matrix.preset}}'
CPACK_PATH=`which -a cpack | grep -m1 -v -i chocolatey`
counter=0; until "$CPACK_PATH" -C ${{matrix.pack_type}} ${{ matrix.cpack_args }} || ((counter > 20)); do sleep 3; ((counter++)); done
test -f '${{github.workspace}}/CI/${{matrix.platform}}/post_pack.sh' \
&& '${{github.workspace}}/CI/${{matrix.platform}}/post_pack.sh' '${{github.workspace}}' "$(ls '${{ env.VCMI_PACKAGE_FILE_NAME }}'.*)"
rm -rf _CPack_Packages
# Workaround for CPack bug on macOS 13
counter=0
until cpack -C ${{matrix.pack_type}} || ((counter > 20))
do sleep 3
((counter++))
done
- name: Artifacts
if: ${{ matrix.pack == 1 }}