Process 1 build 0203261953
This commit is contained in:
@@ -149,19 +149,25 @@ function Wait-ForHttp {
|
||||
throw $lastError
|
||||
}
|
||||
|
||||
function Get-GitChangelogLiteral {
|
||||
$scriptPath = Join-Path $repoRoot "scripts/render_git_changelog.py"
|
||||
$literal = python $scriptPath --python-literal
|
||||
Assert-LastExitCode -CommandName "python scripts/render_git_changelog.py --python-literal"
|
||||
return ($literal | Out-String).Trim()
|
||||
}
|
||||
|
||||
function Update-BuildFiles {
|
||||
param([Parameter(Mandatory = $true)][string]$BuildNumber)
|
||||
|
||||
Write-TextFile -Path ".build_number" -Content "$BuildNumber`n"
|
||||
|
||||
$buildInfo = Read-TextFile -Path "backend/app/build_info.py"
|
||||
$updatedBuildInfo = [regex]::Replace(
|
||||
$buildInfo,
|
||||
'^BUILD_NUMBER = "\d+"$',
|
||||
"BUILD_NUMBER = `"$BuildNumber`"",
|
||||
[System.Text.RegularExpressions.RegexOptions]::Multiline
|
||||
)
|
||||
Write-TextFile -Path "backend/app/build_info.py" -Content $updatedBuildInfo
|
||||
$changelogLiteral = Get-GitChangelogLiteral
|
||||
$buildInfoContent = @(
|
||||
"BUILD_NUMBER = `"$BuildNumber`""
|
||||
"CHANGELOG = $changelogLiteral"
|
||||
""
|
||||
) -join "`n"
|
||||
Write-TextFile -Path "backend/app/build_info.py" -Content $buildInfoContent
|
||||
|
||||
$envPath = Join-Path $repoRoot ".env"
|
||||
if (Test-Path $envPath) {
|
||||
|
||||
Reference in New Issue
Block a user