瀏覽代碼

fix(dw): update touch app dependencies during dw update

The previous touch app update logic did a redundant git pull (code is
already part of main repo), but didn't update pip dependencies. This
caused issues when requirements.txt changed (e.g., qasync version bump).

Now properly:
- Updates pip dependencies from requirements.txt
- Restarts the touch app service to apply changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tuanchris 1 周之前
父節點
當前提交
2905feaf14
共有 1 個文件被更改,包括 10 次插入1 次删除
  1. 10 1
      dw

+ 10 - 1
dw

@@ -171,7 +171,16 @@ cmd_update() {
         echo ""
         echo -e "${BLUE}Updating touch app...${NC}"
         cd "$touch_dir"
-        git pull
+
+        # Update Python dependencies (code already pulled with main repo)
+        if [[ -f "requirements.txt" ]] && [[ -d ".venv" ]]; then
+            echo "Updating touch app dependencies..."
+            source .venv/bin/activate
+            pip install -q -r requirements.txt
+            deactivate
+        fi
+
+        # Restart to apply changes
         sudo systemctl restart dune-weaver-touch
         echo -e "${GREEN}Touch app updated!${NC}"
     fi