mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-29 19:23:36 +01:00
Compare commits
No commits in common. "9a0cc89941d4a9e654c1fad328f134c8793b7a63" and "5add5fa55f754ea87949868dbab88717854e4426" have entirely different histories.
9a0cc89941
...
5add5fa55f
@ -115,7 +115,7 @@ repos:
|
|||||||
- crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.11.1#subdirectory=crdt-sync
|
- crdt-sync @ git+https://github.com/kuhyx/utils@crdt-sync-v0.11.1#subdirectory=crdt-sync
|
||||||
- freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.3#subdirectory=freedays
|
- freedays @ git+https://github.com/kuhyx/utils@freedays-v0.4.3#subdirectory=freedays
|
||||||
- sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.5.5#subdirectory=sickdays
|
- sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.5.5#subdirectory=sickdays
|
||||||
- rtdb-relay @ git+https://github.com/kuhyx/utils@rtdb-relay-v0.2.1#subdirectory=rtdb_relay
|
- rtdb-relay @ git+https://github.com/kuhyx/utils@rtdb-relay-v0.2.0#subdirectory=rtdb_relay
|
||||||
- claude-agent-sdk==0.2.184
|
- claude-agent-sdk==0.2.184
|
||||||
- httpx==0.28.1
|
- httpx==0.28.1
|
||||||
- mcp>=2,<3
|
- mcp>=2,<3
|
||||||
|
|||||||
@ -2,7 +2,7 @@ name: diet_guard_app
|
|||||||
description: "Companion phone app for diet_guard: log meals on the go."
|
description: "Companion phone app for diet_guard: log meals on the go."
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 1.0.183+1
|
version: 1.0.181+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.12.2
|
sdk: ^3.12.2
|
||||||
|
|||||||
@ -13,7 +13,7 @@ dependencies = [
|
|||||||
"defusedxml==0.7.1",
|
"defusedxml==0.7.1",
|
||||||
"httpx==0.28.1",
|
"httpx==0.28.1",
|
||||||
"requests==2.34.2",
|
"requests==2.34.2",
|
||||||
"rtdb-relay @ git+https://github.com/kuhyx/utils@rtdb-relay-v0.2.1#subdirectory=rtdb_relay",
|
"rtdb-relay @ git+https://github.com/kuhyx/utils@rtdb-relay-v0.2.0#subdirectory=rtdb_relay",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Optional extras. The `mcp` group is ONLY needed by the MCP server
|
# Optional extras. The `mcp` group is ONLY needed by the MCP server
|
||||||
|
|||||||
@ -23,6 +23,6 @@ pytest-sugar==1.1.1
|
|||||||
pytest-xdist==3.8.0
|
pytest-xdist==3.8.0
|
||||||
pytest-xvfb==3.1.1
|
pytest-xvfb==3.1.1
|
||||||
requests==2.34.2
|
requests==2.34.2
|
||||||
rtdb-relay @ git+https://github.com/kuhyx/utils@rtdb-relay-v0.2.1#subdirectory=rtdb_relay
|
rtdb-relay @ git+https://github.com/kuhyx/utils@rtdb-relay-v0.2.0#subdirectory=rtdb_relay
|
||||||
ruff==0.17.5
|
ruff==0.17.5
|
||||||
sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.5.5#subdirectory=sickdays
|
sickdays @ git+https://github.com/kuhyx/utils@sickdays-v0.5.5#subdirectory=sickdays
|
||||||
|
|||||||
@ -6,8 +6,6 @@
|
|||||||
# 2. Reinstall it into system Python's user site: diet-guard-gate.service
|
# 2. Reinstall it into system Python's user site: diet-guard-gate.service
|
||||||
# runs /usr/bin/python, not a venv (CLAUDE.md, the 2026-06-19 outage).
|
# runs /usr/bin/python, not a venv (CLAUDE.md, the 2026-06-19 outage).
|
||||||
# 3. Rebuild and reinstall the desktop app package (app/install_arch.sh).
|
# 3. Rebuild and reinstall the desktop app package (app/install_arch.sh).
|
||||||
# 4. Restart the long-running Claude worker so it loads the new code (the
|
|
||||||
# gate is a oneshot timer and picks it up on its next tick).
|
|
||||||
#
|
#
|
||||||
# The phone APK ships through CI (release-apk.yml) and phone_deploy.sh.
|
# The phone APK ships through CI (release-apk.yml) and phone_deploy.sh.
|
||||||
# Idempotent; exits non-zero unless every health check passes.
|
# Idempotent; exits non-zero unless every health check passes.
|
||||||
@ -26,24 +24,14 @@ fail() {
|
|||||||
git -C "$REPO" pull --ff-only
|
git -C "$REPO" pull --ff-only
|
||||||
"$PY" -m pip install --user --break-system-packages -q -e "$REPO"
|
"$PY" -m pip install --user --break-system-packages -q -e "$REPO"
|
||||||
(cd "$REPO/app" && bash install_arch.sh)
|
(cd "$REPO/app" && bash install_arch.sh)
|
||||||
readonly WORKER=diet-guard-claude.service
|
|
||||||
worker_on=false
|
|
||||||
if systemctl --user is-enabled --quiet "$WORKER"; then
|
|
||||||
worker_on=true
|
|
||||||
systemctl --user restart "$WORKER"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Health: the gate's own interpreter imports the code the timer will run...
|
# Health: the gate's own interpreter imports the code the timer will run...
|
||||||
"$PY" -c 'import diet_guard._cli, diet_guard._errors, diet_guard._gatelock' \
|
"$PY" -c 'import diet_guard._cli, diet_guard._errors, diet_guard._gatelock' \
|
||||||
|| fail "system python cannot import the gate"
|
|| fail "system python cannot import the gate"
|
||||||
systemctl --user is-enabled --quiet diet-guard-gate.timer \
|
systemctl --user is-enabled --quiet diet-guard-gate.timer \
|
||||||
|| fail "diet-guard-gate.timer is not enabled"
|
|| fail "diet-guard-gate.timer is not enabled"
|
||||||
if "$worker_on"; then
|
|
||||||
sleep 3 # a worker that crashes on import dies within a second or two
|
|
||||||
systemctl --user is-active --quiet "$WORKER" || fail "$WORKER did not stay up"
|
|
||||||
fi
|
|
||||||
# ...and the desktop package is the version this checkout builds.
|
# ...and the desktop package is the version this checkout builds.
|
||||||
want="$(sed -n 's/^version:[[:space:]]*\([^+]*\).*/\1/p' "$REPO/app/pubspec.yaml")"
|
want="$(sed -n 's/^version:[[:space:]]*\([^+]*\).*/\1/p' "$REPO/app/pubspec.yaml")"
|
||||||
have="$(pacman -Q diet-guard-app | awk '{print $2}')"
|
have="$(pacman -Q diet-guard-app | awk '{print $2}')"
|
||||||
[[ "$have" == "$want-1" ]] || fail "desktop app is $have, want $want-1"
|
[[ "$have" == "$want-1" ]] || fail "desktop app is $have, want $want-1"
|
||||||
echo "deploy: ok (gate imports, timer enabled, worker restarted=$worker_on, desktop app $have)"
|
echo "deploy: ok (gate imports, timer enabled, desktop app $have)"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user