增加 Windows 脚本交互菜单
This commit is contained in:
@@ -160,6 +160,17 @@ powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\web-tools.ps1 start `
|
||||
-DataDir C:\ProgramData\WebTools\data
|
||||
```
|
||||
|
||||
不带操作参数运行 `web-tools.ps1` 时会显示交互菜单:
|
||||
|
||||
```text
|
||||
[1] Start current build (no update)
|
||||
[2] Update from Git, rebuild, and start
|
||||
[3] Update from Git and rebuild only
|
||||
[0] Exit
|
||||
```
|
||||
|
||||
日常双击或使用“使用 PowerShell 运行”打开脚本后,需要更新代码时选择 `2`;`1` 只启动磁盘上已有的 `dist`,不会拉取代码或重新构建。计划任务、快捷方式和自动化仍应显式传入 `start`、`update` 或 `update -NoStart`,不会进入菜单等待输入。
|
||||
|
||||
脚本不会自动修改 Windows 防火墙。需要从局域网访问默认端口时,可由管理员仅对专用网络配置入站规则:
|
||||
|
||||
```powershell
|
||||
|
||||
Reference in New Issue
Block a user