Allow git describe to fail

This commit is contained in:
Gunter Labes 2024-04-11 14:10:55 +02:00 committed by GitHub
parent 82499d0785
commit 020c848c84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -203,7 +203,7 @@ jobs:
# write to an ignored filename so the build is not marked as modified
jq '.modules |= map(select(.name == "wesnoth").sources[0]={type:"dir",path:"."})' packaging/flatpak/org.wesnoth.Wesnoth.json > wesnoth-manifest.json
git config --global --add safe.directory "$PWD"
branch=ci-$(git describe)
branch=ci-$(git describe || :) # if git describe fails just use "ci-" as the branch
flatpak-builder --force-clean --default-branch="$branch" --disable-rofiles-fuse --jobs=2 wesnoth-app wesnoth-manifest.json
flatpak build-export export wesnoth-app "$branch"
flatpak build-bundle export wesnoth.flatpak org.wesnoth.Wesnoth "$branch" --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo