fix PR build on lInux

This commit is contained in:
SoftFever 2024-01-25 21:09:55 +08:00
parent 252788419b
commit 35ab4c645a

View file

@ -21,6 +21,7 @@ jobs:
env: env:
date: date:
ver: ver:
ver_pure:
steps: steps:
- name: Checkout - name: Checkout
@ -36,13 +37,14 @@ jobs:
- name: Get the version and date on Ubuntu and macOS - name: Get the version and date on Ubuntu and macOS
if: inputs.os != 'windows-latest' if: inputs.os != 'windows-latest'
run: | run: |
ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
if [[ "${{ github.event_name }}" == "pull_request" ]]; then if [[ "${{ github.event_name }}" == "pull_request" ]]; then
ver="PR${{ github.event.number }}" ver="PR-${{ github.event.number }}"
else else
ver=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2) ver=V$ver_pure
ver=V$ver
fi fi
echo "ver=$ver" >> $GITHUB_ENV echo "ver=$ver" >> $GITHUB_ENV
echo "ver_pure=$ver_pure" >> $GITHUB_ENV
echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
shell: bash shell: bash
@ -240,6 +242,7 @@ jobs:
shell: bash shell: bash
run: | run: |
./BuildLinux.sh -isr ./BuildLinux.sh -isr
mv ./build/OrcaSlicer_Linux_V${{ env.ver_pure }}.AppImage ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage
chmod +x ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage chmod +x ./build/OrcaSlicer_Linux_${{ env.ver }}.AppImage
- name: Upload artifacts Ubuntu - name: Upload artifacts Ubuntu