-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCREATE_REVIEW_ZIP.ps1
More file actions
30 lines (26 loc) · 988 Bytes
/
Copy pathCREATE_REVIEW_ZIP.ps1
File metadata and controls
30 lines (26 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
param(
[string]$RepoRoot = (Split-Path -Parent $MyInvocation.MyCommand.Path),
[string]$OutputZip = ""
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$repo = [System.IO.Path]::GetFullPath($RepoRoot)
Set-Location -LiteralPath $repo
python .\scripts\clean-local-artifacts.py --repo-root $repo --include-venv | Out-Host
python .\scripts\doctor-local-repo.py --repo-root $repo --json
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
if (-not $OutputZip) {
$stamp = Get-Date -Format "yyyyMMdd-HHmmss"
$OutputZip = Join-Path -Path (Split-Path -Parent $repo) -ChildPath "ME_FM_LLM_review_$stamp.zip"
}
$output = [System.IO.Path]::GetFullPath($OutputZip)
if (Test-Path -LiteralPath $output) { Remove-Item -LiteralPath $output -Force }
$parent = Split-Path -Parent $repo
$name = Split-Path -Leaf $repo
Push-Location -LiteralPath $parent
try {
Compress-Archive -Path $name -DestinationPath $output -Force
} finally {
Pop-Location
}
Write-Output "review_zip=$output"