Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codegen-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
shell: pwsh
run: |
Write-Host "Running code generation validation..."
./scripts/Invoke-CodeGen.ps1
./scripts/Invoke-CodeGen.ps1 -Clean

if ($LASTEXITCODE -ne 0) {
Write-Error "Code generation failed with exit code: $LASTEXITCODE"
Expand Down
13 changes: 12 additions & 1 deletion scripts/Invoke-CodeGen.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ param(
[string]$LocalRepositoryPath,

[Parameter(Mandatory = $false)]
[switch]$Force
[switch]$Force,

[Parameter(Mandatory = $false)]
[switch]$Clean
)

function Invoke-ScriptWithLogging {
Expand Down Expand Up @@ -293,6 +296,14 @@ try {

Write-ElapsedTime "npm ci complete"

if ($Clean) {
Invoke-ScriptWithLogging { npm run clean -w $codegenFolderPath }
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Write-ElapsedTime "npm run clean complete"
}

Invoke-ScriptWithLogging { npm run build -w $codegenFolderPath }
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
Expand Down
Loading