完成JC-ArtList与JC-Salon端侧清理和统一命名
This commit is contained in:
@@ -14,15 +14,15 @@ param(
|
||||
[string]$DatabaseUser = "",
|
||||
[string]$DatabasePassword = "",
|
||||
[string]$InitSqlPath = "",
|
||||
[string]$CorePattern = "^FM-Core",
|
||||
[string]$GatewayPattern = "^FM-Gateway",
|
||||
[string]$CorePattern = "^JC-Salon-Core",
|
||||
[string]$GatewayPattern = "^JC-Salon-Gateway",
|
||||
[string]$WebTargetName = "",
|
||||
[string]$WebTargetHost = "8.137.35.61",
|
||||
[string]$CoreRemoteAppDir = "/opt/jayucloud-salon-core",
|
||||
[string]$GatewayRemoteAppDir = "/opt/jayucloud-salon-gateway",
|
||||
[string]$WebRemoteDir = "/opt/jayucloud-salon-frontend",
|
||||
[string]$CoreServiceName = "jayucloud-salon-core",
|
||||
[string]$GatewayServiceName = "jayucloud-salon-gateway",
|
||||
[string]$CoreRemoteAppDir = "/opt/jc-salon-core",
|
||||
[string]$GatewayRemoteAppDir = "/opt/jc-salon-gateway",
|
||||
[string]$WebRemoteDir = "/opt/jc-salon-frontend",
|
||||
[string]$CoreServiceName = "jc-salon-core",
|
||||
[string]$GatewayServiceName = "jc-salon-gateway",
|
||||
[int]$CoreHealthPort = 81,
|
||||
[int]$GatewayHealthPort = 80,
|
||||
[string]$HealthPath = "/health/check",
|
||||
@@ -483,32 +483,32 @@ function Build-ReleasePackage {
|
||||
$mavenArgs += "-DskipTests"
|
||||
}
|
||||
|
||||
Write-Step "构建 FM-Core"
|
||||
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "FM-Core")
|
||||
Write-Step "构建 JC-Salon-Core"
|
||||
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "JC-Salon-Core")
|
||||
|
||||
Write-Step "构建 FM-Gateway"
|
||||
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "FM-Gateway")
|
||||
Write-Step "构建 JC-Salon-Gateway"
|
||||
Invoke-Native $maven $mavenArgs (Join-Path $resolvedRepoRoot "JC-Salon-Gateway")
|
||||
|
||||
Write-Step "构建 FM-Frontend"
|
||||
$frontendRoot = Join-Path $resolvedRepoRoot "FM-Frontend"
|
||||
Write-Step "构建 JC-Salon-Frontend"
|
||||
$frontendRoot = Join-Path $resolvedRepoRoot "JC-Salon-Frontend"
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $frontendRoot "node_modules"))) {
|
||||
Invoke-Native "npm" @("ci") $frontendRoot
|
||||
}
|
||||
Invoke-Native "npm" @("run", "build") $frontendRoot
|
||||
}
|
||||
|
||||
$coreJar = Join-Path $resolvedRepoRoot "FM-Core\target\JayuCloud-Salon-Core.jar"
|
||||
$gatewayJar = Join-Path $resolvedRepoRoot "FM-Gateway\target\JayuCloud-Salon-Gateway.jar"
|
||||
$frontendDist = Join-Path $resolvedRepoRoot "FM-Frontend\dist"
|
||||
$coreJar = Join-Path $resolvedRepoRoot "JC-Salon-Core\target\JC-Salon-Core.jar"
|
||||
$gatewayJar = Join-Path $resolvedRepoRoot "JC-Salon-Gateway\target\JC-Salon-Gateway.jar"
|
||||
$frontendDist = Join-Path $resolvedRepoRoot "JC-Salon-Frontend\dist"
|
||||
foreach ($requiredPath in @($coreJar, $gatewayJar, $frontendDist, $InitSqlPath)) {
|
||||
if (-not (Test-Path -LiteralPath $requiredPath)) {
|
||||
throw "缺少发布产物:$requiredPath"
|
||||
}
|
||||
}
|
||||
|
||||
$coreArtifact = Join-Path $backendDir "JayuCloud-Salon-Core.jar"
|
||||
$gatewayArtifact = Join-Path $backendDir "JayuCloud-Salon-Gateway.jar"
|
||||
$frontendArtifact = Join-Path $frontendDir "jayucloud-salon-frontend-dist.tar.gz"
|
||||
$coreArtifact = Join-Path $backendDir "JC-Salon-Core.jar"
|
||||
$gatewayArtifact = Join-Path $backendDir "JC-Salon-Gateway.jar"
|
||||
$frontendArtifact = Join-Path $frontendDir "jc-salon-frontend-dist.tar.gz"
|
||||
$sqlArtifact = Join-Path $sqlDir "店务独立数据库_20260825.sql"
|
||||
Copy-Item -LiteralPath $coreJar -Destination $coreArtifact -Force
|
||||
Copy-Item -LiteralPath $gatewayJar -Destination $gatewayArtifact -Force
|
||||
@@ -521,7 +521,7 @@ function Build-ReleasePackage {
|
||||
if (Test-Path -LiteralPath $frontendArtifact) {
|
||||
Remove-Item -LiteralPath $frontendArtifact -Force
|
||||
}
|
||||
Invoke-Native $tar.Source @("-czf", $frontendArtifact, "-C", (Join-Path $resolvedRepoRoot "FM-Frontend"), "dist")
|
||||
Invoke-Native $tar.Source @("-czf", $frontendArtifact, "-C", (Join-Path $resolvedRepoRoot "JC-Salon-Frontend"), "dist")
|
||||
|
||||
$hashes = foreach ($artifact in @($coreArtifact, $gatewayArtifact, $frontendArtifact, $sqlArtifact)) {
|
||||
$hash = Get-FileHash -LiteralPath $artifact -Algorithm SHA256
|
||||
@@ -656,7 +656,7 @@ echo "Web current -> `$TARGET"
|
||||
function Publish-Web {
|
||||
param([object]$Server, [string]$ArchivePath)
|
||||
|
||||
$archiveName = "jayucloud-salon-frontend-dist-$releaseTimestamp.tar.gz"
|
||||
$archiveName = "jc-salon-frontend-dist-$releaseTimestamp.tar.gz"
|
||||
$quotedWebRemoteDir = ConvertTo-BashSingleQuoted $WebRemoteDir
|
||||
Write-Step "准备 Web 目标机器"
|
||||
Invoke-RemoteShell $Server "mkdir -p $quotedWebRemoteDir/releases"
|
||||
|
||||
Reference in New Issue
Block a user