diff --git a/src/ServicePulse.Host/build.ps1 b/src/ServicePulse.Host/build.ps1 index 15d8fcd70..03a67b957 100644 --- a/src/ServicePulse.Host/build.ps1 +++ b/src/ServicePulse.Host/build.ps1 @@ -7,22 +7,21 @@ if (Test-Path $AppOutputFolder) { } New-Item -ItemType Directory -Force -Path $AppOutputFolder - Push-Location $FrontendSourceFolder -npm audit --audit-level=low --omit=dev -if ( $? -eq $false ) { - exit $LastExitCode -} +npm audit --audit-level=low --omit=dev +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } npm install +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + npm run lint +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + npm run build +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + Remove-Item -Path "./dist/mockServiceWorker.js" -ErrorAction SilentlyContinue Pop-Location Copy-Item -path $FrontendSourceFolder/dist/* -Destination $AppOutputFolder -Recurse - -if ( $? -eq $false ) { - exit $LastExitCode -} diff --git a/src/ServicePulse/build.ps1 b/src/ServicePulse/build.ps1 deleted file mode 100644 index 6817b0c91..000000000 --- a/src/ServicePulse/build.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -$ScriptPath = $PSCommandPath | Split-Path -$FrontendSourceFolder = $ScriptPath + "/../Frontend" - -Push-Location $FrontendSourceFolder -npm install -npm run build -Pop-Location - -if ( $? -eq $false ) { - exit $LastExitCode -} \ No newline at end of file