v0.7.0 — version ticker and update check
The admin footer used to print getenv('APP_VERSION') ?: 'v0.5.5'. APP_VERSION was set nowhere in the repository, so the fallback always won and every deployment claimed a version that existed only in a template. This release makes the footer tell the truth.
Build identity
Baked at image build time, in two distinct kinds:
- release — stamped by CI from the tag it built. The release workflow now fails the build if the tag or revision cannot be resolved.
- source — from
git describein a local build, shown as a source build with ansrcmarker.
They are never mixed behind one variable. The nearest reachable tag is not the newest tag in a repository, so a source checkout comparing itself to upstream can confidently report "behind" for a build that has actually diverged. A source build therefore never claims to be current or behind.
Update check
version:check runs twice daily and reads GitHub's releases/latest into a typed single-row core.update_status.
- Redirects disabled — PHP streams follow them by default and would forward the
Authorizationheader to the target host. - Every response field validated;
tag_namemust parse as semver;html_urlis ignored. All URLs are built locally from a validatedowner/reposlug against constant hosts, so the operator picks the repository but never the host that receives the token. last_attempt_atandlast_success_atare separate, because one timestamp cannot mean both "when did we last try" and "how old is this answer".- A failed attempt keeps the last good answer but exits non-zero, so
core.cron_runsrecords it. Freshness ages out into astalestate rather than letting an old verdict stand forever.
Footer
Five states with a strict precedence order. Only behind carries links — to the release page, plus a "how to update" link pinned to that release so the instructions match the version being offered. Status resolution never throws: the footer is decorative and must not be able to 500 an admin page.
Upgrading
See Updating an existing install. This release adds one migration (core.update_status) and three optional settings: UPDATE_CHECK_ENABLED, UPDATE_CHECK_REPO, UPDATE_CHECK_TOKEN. Checking is on by default and needs no token.