Fallback to commit hash

This commit is contained in:
Gunter Labes 2024-04-23 23:52:30 +02:00
parent b3802f44ea
commit b14ff85b0c
No known key found for this signature in database
GPG key ID: C0C7B971CC910216

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 || :) # if git describe fails just use "ci-" as the branch
branch=ci-$(git describe || git log -n 1 --format=%h) # if git describe fails fall back to the commit hash
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