Skip to content

Commit ef6aaa0

Browse files
Update test-example.ps1
1 parent d2d863e commit ef6aaa0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test-example.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Write-Output "Branch name: $env:branchName"
22
$global:inputVersion = $env:branchName
3-
$global:LASTEXITCODE = 0
3+
$global:errorCode = 0
44

55
$BUILD_VERSIONS_LIST = "BUILD_VERSIONS_LIST"
66

@@ -25,8 +25,8 @@ function Process-JavaScriptProjects {
2525
[hashtable[]]$Folders = @(
2626
@{ Name = "jQuery"; Packages = @("devextreme-dist", "devextreme") },
2727
@{ Name = "Angular"; Packages = @("devextreme-angular", "devextreme") },
28-
@{ Name = "Vue"; Packages = @("devextreme-vue", "devextreme") },
29-
@{ Name = "React"; Packages = @("devextreme-react", "devextreme") }
28+
@{ Name = "React"; Packages = @("devextreme-react", "devextreme") },
29+
@{ Name = "Vue"; Packages = @("devextreme-vue", "devextreme") }
3030
)
3131
)
3232
Write-Host "`n--== Processing JavaScript Projects ==--"
@@ -54,7 +54,7 @@ function Process-JavaScriptProjects {
5454
$installResult = & npm install --force --no-fund --loglevel=error -PassThru
5555
if ($LASTEXITCODE -ne 0) {
5656
Write-Error "ERROR: npm install failed in $($folder.Name)"
57-
$global:LASTEXITCODE = 1
57+
$global:errorCode = 1
5858
}
5959

6060
Write-Host "`n<-- Updating packages... -->"
@@ -63,7 +63,7 @@ function Process-JavaScriptProjects {
6363
$buildResult = & npm run build
6464
if ($LASTEXITCODE -ne 0) {
6565
Write-Error "ERROR: npm run build failed in $($folder.Name)"
66-
$global:LASTEXITCODE = 1
66+
$global:errorCode = 1
6767
}
6868

6969
Set-Location ..
@@ -92,7 +92,7 @@ function Process-DotNetProjects {
9292
Write-Host "Build succeeded for $($slnFile.FullName)."
9393
} else {
9494
Write-Error "Build failed for $($slnFile.FullName)."
95-
$global:LASTEXITCODE = 1
95+
$global:errorCode = 1
9696
}
9797
}
9898
}
@@ -139,6 +139,6 @@ Set-BuildVersion
139139
Process-JavaScriptProjects
140140
Process-DotNetProjects
141141

142-
Write-Host "Error code: $global:LASTEXITCODE"
142+
Write-Host "Error code: $global:errorCode"
143143

144-
exit $global:LASTEXITCODE
144+
exit $global:errorCode

0 commit comments

Comments
 (0)