Improve release QA deployment checks

This commit is contained in:
2026-07-07 15:21:28 +09:00
parent 8b700701f2
commit 97a7432df3
2 changed files with 82 additions and 37 deletions

View File

@@ -53,7 +53,19 @@ if ($BackupRetention -lt 0) {
}
$timestamp = Get-Date -Format "yyyyMMddHHmmss"
$fullCommit = (git rev-parse HEAD).Trim()
$commit = (git rev-parse --short=8 HEAD).Trim()
$qaVersion = if ($env:PUBLIC_QA_VERSION) { $env:PUBLIC_QA_VERSION } else { "deploy-$timestamp" }
$releaseManifestPath = Join-Path $dist "release-manifest.json"
@{
app = "heros_web"
commit = $fullCommit
shortCommit = $commit
qaVersion = $qaVersion
generatedAt = (Get-Date).ToUniversalTime().ToString("o")
} | ConvertTo-Json -Depth 4 | Set-Content -LiteralPath $releaseManifestPath -Encoding UTF8
Write-Host "Wrote $releaseManifestPath for $commit ($qaVersion)"
$userHost = "$SshUser@$SshHost"
$remoteTemp = "$RemoteRoot/.$($SiteName)_deploy_$timestamp"
$remotePrevious = "$RemoteRoot/.$($SiteName)_previous_$timestamp"