This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/main by this push:
new 877c30a Create local certificates automatically if they do not exist
877c30a is described below
commit 877c30a546ad1e0cf58d521338b212889b374f50
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Jan 19 19:53:22 2026 +0000
Create local certificates automatically if they do not exist
---
Makefile | 2 ++
scripts/check-certs | 15 +++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/Makefile b/Makefile
index 6818ae4..dc2db7f 100644
--- a/Makefile
+++ b/Makefile
@@ -107,12 +107,14 @@ run-playwright-slow:
docker run --net=host -it atr-playwright python3 test.py --tidy
serve:
+ @scripts/check-certs
SSH_HOST=127.0.0.1 uv run --frozen hypercorn --bind $(BIND) \
--keyfile hypercorn/secrets/localhost.apache.org+2-key.pem \
--certfile hypercorn/secrets/localhost.apache.org+2.pem \
atr.server:app --debug --reload --worker-class uvloop
serve-local:
+ @scripts/check-certs
APP_HOST=localhost.apache.org:8080 DISABLE_CHECK_CACHE=1 ALLOW_TESTS=1 \
SSH_HOST=127.0.0.1 uv run --frozen hypercorn --bind $(BIND) \
--keyfile hypercorn/secrets/localhost.apache.org+2-key.pem \
diff --git a/scripts/check-certs b/scripts/check-certs
new file mode 100755
index 0000000..93d8760
--- /dev/null
+++ b/scripts/check-certs
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -eu
+
+STATE_DIR="${STATE_DIR:-state}"
+KEY_FILE="$STATE_DIR/hypercorn/secrets/localhost.apache.org+2-key.pem"
+CERT_FILE="$STATE_DIR/hypercorn/secrets/localhost.apache.org+2.pem"
+
+if [ ! -f "$KEY_FILE" ] || [ ! -f "$CERT_FILE" ]
+then
+ echo "Error: TLS certificates not found" >&2
+ echo "This may be due to the new layout of the state directory" >&2
+ echo "Running 'make certs-local' for you automatically" >&2
+ echo "Don't forget to clean up the old certificates" >&2
+ make certs-local
+fi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]