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
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)"
- name: Build flatpak

View file

@ -53,10 +53,19 @@ jobs:
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
- 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: |
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)"
if [[ "${{ steps.read_file.outputs.file_content }}" == *"VERSION=THISBRANCH"* ]]; then
echo "Version string is present, proceeding."
else
echo "Error: You forgot to specify the version."
exit 1
fi
- name: Build flatpak
run: |

View file

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