Release v2.1.0: Programmatic zero-token version bumper (hs-sync-version --auto-bump) and daily 00:20 UTC VPS archive rotation cronjob (deploy/run-vps-archive-rotation.sh)
This commit is contained in:
1 parent
54e7f8ff61
commit
b9703cda5e
47 files changed
+1243
-598
No files matched your search
@@ -122,18 +122,19 @@ if [[ -d "${REPOS_ROOT}/haiperdohp-jemaytreeah" ]]; then
|
||||
echo "[build] Copying haiperdohp-jemaytreeah/config.default.js -> config.js..."
|
||||
run_checked "copy haiperdohp-jemaytreeah config.js" cp "${REPOS_ROOT}/haiperdohp-jemaytreeah/config.default.js" "${REPOS_ROOT}/haiperdohp-jemaytreeah/config.js"
|
||||
fi
|
||||
if [[ ! -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/db_lite.json" || ! -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/db.json" ]] && [[ -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/tools/generate_db_json.py" ]]; then
|
||||
if [[ ! -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/db_lite.json" || ! -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/db.json" || "${REPOS_ROOT}/haiperdohp-jemaytreeah/db.txt" -nt "${REPOS_ROOT}/haiperdohp-jemaytreeah/db.json" ]] && [[ -f "${REPOS_ROOT}/haiperdohp-jemaytreeah/tools/generate_db_json.py" ]]; then
|
||||
echo "[build] Generating haiperdohp-jemaytreeah/db.json and db_lite.json from db.txt..."
|
||||
(cd "${REPOS_ROOT}/haiperdohp-jemaytreeah" && run_checked "generate_db_json.py" "${PYTHON_BIN}" tools/generate_db_json.py db.txt db.json)
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "[2/5] Synchronizing local workspace.toml version and running hs-doctor, version_sync --check, and 6-Gate Knowledge Graph Verification..."
|
||||
echo "[2/5] Synchronizing local workspace.toml version, rebuilding SQLite FTS5 catalog, and running hs-doctor, version_sync --check, and 6-Gate Knowledge Graph Verification..."
|
||||
if [[ -f "${REPOS_ROOT}/workspace.toml" ]] && [[ -f "${REPOS_ROOT}/hyperstitionstudio-core/workspace.example.toml" ]]; then
|
||||
# Sync schema_version in untracked parent workspace.toml with hyperstitionstud_io.__version__
|
||||
run_checked "version_sync (sync untracked workspace.toml)" "${PYTHON_BIN}" -m hyperstitionstud_io.version_sync
|
||||
fi
|
||||
run_checked "version_sync --check" "${PYTHON_BIN}" -m hyperstitionstud_io.version_sync --check
|
||||
run_checked "hs-db-build (--build)" "${PYTHON_BIN}" -m hyperstitionstud_io.db.sqlite_meta --build
|
||||
run_checked "hs-doctor" "${PYTHON_BIN}" -m hyperstitionstud_io.ci.doctor
|
||||
run_checked "build_encyclopedia_knowledge_graph.py --verify-only" "${PYTHON_BIN}" "${REPOS_ROOT}/encyclopedia-knowledge-graph/scripts/build_encyclopedia_knowledge_graph.py" --verify-only
|
||||
|
||||
@@ -208,6 +209,18 @@ if [[ "${DO_CADDY}" -eq 1 ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
SRC_CRON_ROTATE="${DEPLOY_DIR}/cron.d/hyperstition-archive-rotate"
|
||||
DST_CRON_ROTATE="/etc/cron.d/hyperstition-archive-rotate"
|
||||
if [[ -f "${SRC_CRON_ROTATE}" ]] && [[ -d "/etc/cron.d" ]] && { [[ -w "/etc/cron.d" ]] || [[ -n "${SUDO}" ]]; }; then
|
||||
if [[ -f "${DST_CRON_ROTATE}" ]] && cmp -s "${SRC_CRON_ROTATE}" "${DST_CRON_ROTATE}"; then
|
||||
echo "[5/5] ${DST_CRON_ROTATE} is already identical to deploy/cron.d/hyperstition-archive-rotate."
|
||||
else
|
||||
echo "[5/5] Installing 00:20 UTC archive rotation cron rule to ${DST_CRON_ROTATE}..."
|
||||
run_checked "copy hyperstition-archive-rotate cron rule" ${SUDO} cp "${SRC_CRON_ROTATE}" "${DST_CRON_ROTATE}"
|
||||
run_checked "chmod 0644 ${DST_CRON_ROTATE}" ${SUDO} chmod 0644 "${DST_CRON_ROTATE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$(type -P systemctl || true)" ]] && [[ -d "/run/systemd/system" ]]; then
|
||||
UNITS_CHANGED=0
|
||||
for unit_name in \
|
||||
@@ -216,7 +229,9 @@ if [[ "${DO_CADDY}" -eq 1 ]]; then
|
||||
"hyperstition-closing-bell-harvest.service" \
|
||||
"hyperstition-closing-bell-harvest.timer" \
|
||||
"hyperstition-utc-rollover-harvest.service" \
|
||||
"hyperstition-utc-rollover-harvest.timer"; do
|
||||
"hyperstition-utc-rollover-harvest.timer" \
|
||||
"hyperstition-archive-rotate.service" \
|
||||
"hyperstition-archive-rotate.timer"; do
|
||||
src_u="${DEPLOY_DIR}/${unit_name}"
|
||||
dst_u="/etc/systemd/system/${unit_name}"
|
||||
if [[ -f "${src_u}" ]]; then
|
||||
@@ -234,6 +249,7 @@ if [[ "${DO_CADDY}" -eq 1 ]]; then
|
||||
run_checked "systemctl restart hyperstition-mcp.service" ${SUDO} systemctl restart hyperstition-mcp.service
|
||||
run_checked "systemctl enable --now hyperstition-closing-bell-harvest.timer" ${SUDO} systemctl enable --now hyperstition-closing-bell-harvest.timer
|
||||
run_checked "systemctl enable --now hyperstition-utc-rollover-harvest.timer" ${SUDO} systemctl enable --now hyperstition-utc-rollover-harvest.timer
|
||||
run_checked "systemctl enable --now hyperstition-archive-rotate.timer" ${SUDO} systemctl enable --now hyperstition-archive-rotate.timer
|
||||
elif [[ -f "/etc/systemd/system/hyperstition-mcp.service" ]]; then
|
||||
echo "[5/5] Restarting hyperstition-mcp.service to load latest MCP & REST API v1 (/api/v1/*) modules..."
|
||||
run_checked "systemctl enable --now hyperstition-mcp.service" ${SUDO} systemctl enable --now hyperstition-mcp.service
|
||||
|
||||
Reference in new issue
Block a user