feat: 部署脚本支持 .env.AMS,与 ASG 一致从 .sample 生成无后缀文件

Made-with: Cursor
This commit is contained in:
2026-03-20 18:23:18 +08:00
parent ded45063d9
commit a70545b702
3 changed files with 11 additions and 4 deletions
+7 -2
View File
@@ -1,4 +1,4 @@
#Requires -Version 5.1
#Requires -Version 5.1
# EasyAI Windows 一键部署脚本
# 仅支持 IP 访问(本地/局域网),不含域名与 HTTPS
# 一行命令: git clone https://git.51easyai.com/wangbo/easyai; cd easyai; .\start.ps1
@@ -138,7 +138,7 @@ function Setup-EnvFiles {
Write-Host ""
Write-Step "📝 配置环境文件..."
# 复制 .env.tools.env.ASG
# 复制 .env.tools.env.ASG、.env.AMS(无 example 后缀的从 .sample 生成)
if (-not (Test-Path ".env.tools")) {
Copy-Item ".env.tools.sample" ".env.tools"
Write-Ok ".env.tools"
@@ -147,6 +147,10 @@ function Setup-EnvFiles {
Copy-Item ".env.ASG.sample" ".env.ASG"
Write-Ok ".env.ASG"
}
if (-not (Test-Path ".env.AMS")) {
Copy-Item ".env.AMS.sample" ".env.AMS"
Write-Ok ".env.AMS"
}
# 配置 .env
if (-not (Test-Path ".env")) {
@@ -404,6 +408,7 @@ function Main {
} else {
if (-not (Test-Path ".env.tools")) { Copy-Item ".env.tools.sample" ".env.tools" }
if (-not (Test-Path ".env.ASG")) { Copy-Item ".env.ASG.sample" ".env.ASG" }
if (-not (Test-Path ".env.AMS")) { Copy-Item ".env.AMS.sample" ".env.AMS" }
}
if ($script:DeployDryRun) {