Improved pipelines adding a version check on main [skip ci]

This commit is contained in:
XargonWan 2023-08-25 15:30:40 +02:00
parent b80b95930b
commit fdcbaa345c
3 changed files with 14 additions and 5 deletions

View file

@ -64,7 +64,7 @@ jobs:
- name: Setting branch in the manifest - name: Setting branch in the manifest
run: | run: |
sed -i "s/branch: THISBRANCH/branch: $(git rev-parse --abbrev-ref HEAD)/g" net.retrodeck.retrodeck.yml 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)" echo "Branch name is: $(git rev-parse --abbrev-ref HEAD)"
- name: Build flatpak - name: Build flatpak

View file

@ -53,10 +53,19 @@ jobs:
runtime/org.freedesktop.Platform.ffmpeg-full/x86_64/22.08 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 /bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh # Run pre-build automation tasks
- name: Setting branch in the manifest - name: Read manifest content
id: read_manifest
run: echo "::set-output name=file_content::$(cat net.retrodeck.retrodeck.yml)"
- name: Check VERSION
id: check_version_string
run: | run: |
sed -i "s/branch: THISBRANCH/branch: $(git rev-parse --abbrev-ref HEAD)/g" net.retrodeck.retrodeck.yml if [[ "${{ steps.read_file.outputs.file_content }}" == *"VERSION=THISBRANCH"* ]]; then
echo "Branch name is: $(git rev-parse --abbrev-ref HEAD)" echo "Version string is present, proceeding."
else
echo "Error: You forgot to specify the version."
exit 1
fi
- name: Build flatpak - name: Build flatpak
run: | run: |

View file

@ -76,7 +76,7 @@ modules:
build-commands: build-commands:
- | - |
VERSION=$(git rev-parse --abbrev-ref HEAD) VERSION=THISBRANCH
git checkout ${GITHUB_REF_NAME} git checkout ${GITHUB_REF_NAME}
mkdir -p ${FLATPAK_DEST}/retrodeck/ mkdir -p ${FLATPAK_DEST}/retrodeck/