diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df3f05a1..e6d6c9f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -140,13 +140,21 @@ jobs: # along in a release built from it. The three bundled examples are # tracked source and stay — the include rules come first because rsync # takes the first matching rule. + # + # Every pattern is ANCHORED with a leading slash, meaning + # backend/modules and nothing else. Without it rsync matches a + # directory called `modules` at any depth, and this repository has a + # second one: resources/js/Pages/admin/modules. Unanchored, these rules + # stripped the Modules admin screen out of every release — so the one + # screen that installs a module was missing from the package, and the + # UI answered "Page unavailable" with no way to tell why. rsync -a backend/ "${DIST}/backend/" \ - --include='modules/' \ - --include='modules/README.md' \ - --include='modules/ExampleHooks/***' \ - --include='modules/ExampleShowcase/***' \ - --include='modules/OrderPinger/***' \ - --exclude='modules/*' \ + --include='/modules/' \ + --include='/modules/README.md' \ + --include='/modules/ExampleHooks/***' \ + --include='/modules/ExampleShowcase/***' \ + --include='/modules/OrderPinger/***' \ + --exclude='/modules/*' \ --exclude='.env' \ --exclude='node_modules' \ --exclude='tests' \ @@ -172,6 +180,28 @@ jobs: mkdir -p "${DIST}/backend/storage/framework/views" touch "${DIST}/backend/storage/logs/.gitkeep" + # Every tracked file under backend/resources/ has to be in the package. + # + # This is the check that was missing when an unanchored rsync exclude + # quietly dropped resources/js/Pages/admin/modules — three files out of + # 228, in a package nobody counts by hand. The Dockerfile check below + # did not catch it: the directory it copies was there, only emptied. + # + # resources/ is entirely source that ships; anything excluded from it + # is a mistake by definition, which is what makes this safe to assert. + missing_resources=0 + while read -r tracked; do + rel="${tracked#backend/}" + if [ ! -e "${DIST}/backend/${rel}" ]; then + echo "::error::${tracked} is tracked but missing from the release package" + missing_resources=$((missing_resources + 1)) + fi + done < <(git ls-files backend/resources) + if [ "$missing_resources" -ne 0 ]; then + echo "::error::${missing_resources} tracked file(s) under backend/resources did not make it into the package" + exit 1 + fi + # The package promises `docker compose up -d --build` works from the # unpacked folder, so every path the Dockerfile copies has to be in it. # Nothing compared these two files before, which is how v0.22.0 shipped diff --git a/CHANGELOG.md b/CHANGELOG.md index 26bca2a4..f1bd3b43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,16 @@ Format based on [Keep a Changelog](https://keepachangelog.com/). ### Fixed +- **The release package no longer ships without the Modules admin screen.** The rsync rules + that keep locally installed modules out of a release were unanchored, so they matched any + directory called `modules` — and this repository has a second one, + `resources/js/Pages/admin/modules`. Three files were dropped from every package, which left + the one screen that installs a module answering "Page unavailable" with no way to tell why. + The rules are anchored to `backend/modules`, and the release now fails if any tracked file + under `backend/resources` is missing from the package. + +### Fixed + - **The Docker build no longer downloads the RoadRunner binary from GitHub.** `vendor/bin/rr get-binary` asked api.github.com for the release list on every build, and five services in `docker-compose.yml` build from this Dockerfile — so one `up --build` made that call several