Skip to content

Conversation

@slievrly
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR optimizes the deployment and stop scripts by introducing absolute path references, allowing the scripts to be executed from any directory. The key changes include script directory auto-detection and converting all relative paths to absolute paths based on the detected project root.

  • Adds PROJECT_ROOT variable detection in all scripts to calculate the project root directory
  • Updates all file paths (logs, service directories) to use absolute paths via $PROJECT_ROOT or %PROJECT_ROOT%
  • Changes batch file comment style from :: to REM for consistency
  • Adds comprehensive README.md documentation for the scripts directory

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
scripts/stop.sh Adds PROJECT_ROOT detection and converts PID file paths to absolute paths
scripts/stop.bat Changes comment style from :: to REM
scripts/deploy.sh Adds PROJECT_ROOT detection and converts all directory navigation and log file paths to absolute paths
scripts/deploy.bat Adds PROJECT_ROOT detection and updates cd commands to use absolute paths
scripts/README.md New documentation file explaining script usage, troubleshooting, and the path variable system
Comments suppressed due to low confidence (1)

scripts/deploy.bat:5

  • The PROJECT_ROOT detection is incorrect. Using 'cd' gets the current working directory where the script is called from, not the script's directory. This defeats the purpose of the optimization. Consider using '%~dp0' to get the script's directory and then navigate to the parent: set "SCRIPT_DIR=%~dp0" followed by for %%A in ("%SCRIPT_DIR%..") do set "PROJECT_ROOT=%%~fA".

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +49 to +55
cd /path/to/lifetcontext
./scripts/deploy.sh
```

**停止所有服务:**
```bash
cd /path/to/lifetcontext
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'lifetcontext' to 'lifecontext'.

Suggested change
cd /path/to/lifetcontext
./scripts/deploy.sh
```
**停止所有服务:**
```bash
cd /path/to/lifetcontext
cd /path/to/lifecontext
./scripts/deploy.sh

停止所有服务:

cd /path/to/lifecontext

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant