diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf1e73b..a0312aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -684,6 +684,11 @@ jobs: mkdir -p "$repo" ostree --repo="$repo" init --mode=archive-z2 fi + # git drops empty directories: a checked-out site/repo lacks + # refs/remotes and refs/mirrors, and `build-update-repo + # --generate-static-deltas` aborts with + # "opendir(refs/remotes): No such file or directory" without them. + mkdir -p "$repo/refs/remotes" "$repo/refs/mirrors" ls -la dist/*.flatpak for bundle in dist/*.flatpak; do flatpak build-import-bundle \ @@ -1092,6 +1097,10 @@ jobs: echo "::warning::Snap Store queued a human review (allow-installation). The .snap is on the GitHub Release." exit 0 fi + if grep -F -q "Waiting for previous upload(s)" "$log"; then + echo "::error::Snap Store publish failed: an older upload is still in the review queue. Reject and remove it at https://dashboard.snapcraft.io/ (the upload page lists it), then re-run this job." + exit "$status" + fi echo "::error::Snap Store publish failed (exit $status) for a reason other than allow-installation review." exit "$status" diff --git a/tests/test_release_integrity.py b/tests/test_release_integrity.py index 11553b3..50ec83a 100644 --- a/tests/test_release_integrity.py +++ b/tests/test_release_integrity.py @@ -292,3 +292,17 @@ def test_the_remote_publish_is_stable_gated_and_keeps_history(): "continue-on-error" not in block ), "a tolerated checkout failure falls through to the empty-repo path" assert ".flatpakref" in block, "no app ref is written for one-command installs" + + +def test_the_remote_publish_recreates_dirs_git_drops() -> None: + """git does not track empty directories, so a site/repo checked out from + gh-pages comes back without refs/remotes or refs/mirrors — and + `flatpak build-update-repo --generate-static-deltas` aborts on + `opendir(refs/remotes): No such file or directory` when it enumerates refs + for deltas. v0.18.3 hit exactly this on the first real remote publish.""" + block = _jobs()["publish-flatpak-remote"] + mkdir = 'mkdir -p "$repo/refs/remotes" "$repo/refs/mirrors"' + assert mkdir in block, "the copied-back repo must re-create the ref dirs git dropped" + assert block.index(mkdir) < block.index( + "flatpak build-update-repo" + ), "the dirs must exist before build-update-repo enumerates refs"