[SCM] postgis.net branch website updated. clarity-final-250-g9880272
git at osgeo.org
git at osgeo.org
Sat Aug 15 09:59:19 PDT 2026
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "postgis.net".
The branch, website has been updated
via 9880272a4d458061571cf615fac69e512fc14e3e (commit)
via c1c349580fca3981eb5c26f6e000098db1dfeeca (commit)
from 82c4b4460c535bb466bf2c66c44f0c6a775d82ba (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9880272a4d458061571cf615fac69e512fc14e3e
Merge: 82c4b44 c1c3495
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date: Sat Aug 15 09:59:18 2026 -0700
Merge pull request 'publish: prune old release builds and lock the cron' (!34) from Komzpa/postgis.net:fix/publish-retention-20260815 into website
Reviewed-on: https://gitea.osgeo.org/postgis/postgis.net/pulls/34
commit c1c349580fca3981eb5c26f6e000098db1dfeeca
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Sat Aug 15 20:47:48 2026 +0400
publish: prune old release builds and lock the cron
Each make publish builds a fresh .public-releases/public.<timestamp>.<pid>
directory and swaps the public symlink onto it, and nothing ever removed
the old ones: by 2026-08-15 the production host had accumulated 4176 of
them, 74 GB of a 131 GB disk, which took down both site publishing and the
Jenkins instance sharing the host. publish now keeps the three newest
release directories plus the current public symlink target and deletes the
rest; the prune step is non-fatal so it can never turn a successful publish
into a failure. The cron line documented in the README is wrapped in
flock -n so a slow publish skips the next tick instead of overlapping it.
diff --git a/Makefile b/Makefile
index c12f66b..dab9ca3 100644
--- a/Makefile
+++ b/Makefile
@@ -31,12 +31,16 @@ check-ci: ## Check the Hugo CI status page assets
test -s "$(CI)/ci-status.css"
test -s "$(CI)/ci-status.js"
-publish: ## Build the site and CI status, then atomically switch public
+publish: ## Build the site and CI status, atomically switch public, drop old releases
release="$(CURDIR)/.public-releases/public.$$(date -u +%Y%m%dT%H%M%SZ).$$$$"; \
$(MAKE) site PUBLIC="$$release" && \
chown -R www-data:www-data "$$release" && \
ln -sfn "$$release" "$(PUBLIC).next" && \
mv -Tf "$(PUBLIC).next" "$(PUBLIC)"
+ -cd "$(CURDIR)/.public-releases" && \
+ ls -1d public.* | sort -r | tail -n +4 | \
+ grep -vx "$$(basename "$$(readlink "$(PUBLIC)")")" | \
+ xargs -r rm -rf --
site: docs compat ## Build the Hugo site with generated compatibility and CI data
hugo -D --destination "$(PUBLIC)"
diff --git a/README.md b/README.md
index 2de0ff3..719d611 100644
--- a/README.md
+++ b/README.md
@@ -51,7 +51,8 @@ the Hugo pages, CSS, and JavaScript that render those payloads. Generated files
stay under `.public-releases/`, and the live `public` path is a symbolic link to
the latest complete release. `make -j publish` builds the complete site into a
new release directory, then switches the `public` symlink after all outputs are
-ready.
+ready, then prunes `.public-releases/` down to the newest three release
+directories plus whichever one `public` currently points to.
Do not run `git clean -fdx` in the production website checkout before
publishing. It removes the ignored `.public-releases/` directory and the live
@@ -75,9 +76,13 @@ Replace the current root cron entry:
with:
```cron
-*/5 * * * * cd /var/www/postgis_website && git pull --ff-only && git -C ../postgis pull --ff-only && make -j publish
+*/5 * * * * flock -n /var/lock/postgis-website-publish.lock -c 'cd /var/www/postgis_website && git pull --ff-only && git -C ../postgis pull --ff-only && make -j publish'
```
+`flock -n` skips a tick outright instead of queuing it when the previous
+publish is still running, so a slow build cannot overlap the next cron
+invocation.
+
This also refreshes `/development/docs/` and `/ci/` when only the PostGIS
repository changes. Existing Jenkins Doxygen and release-manual jobs are
unchanged.
-----------------------------------------------------------------------
Summary of changes:
Makefile | 6 +++++-
README.md | 9 +++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
hooks/post-receive
--
postgis.net
More information about the postgis-tickets
mailing list