diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 7ff0d3c2..debbfb76 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -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 diff --git a/.github/workflows/main-selfhosted.yml b/.github/workflows/main-selfhosted.yml index d8685cf7..47381d0d 100644 --- a/.github/workflows/main-selfhosted.yml +++ b/.github/workflows/main-selfhosted.yml @@ -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: | diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 84e6aa85..aa6a1f33 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -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/