diff --git a/.vsts-ci/azure-pipelines-ci.yml b/.vsts-ci/azure-pipelines-ci.yml index af8ad3bea5..137e6cad0c 100644 --- a/.vsts-ci/azure-pipelines-ci.yml +++ b/.vsts-ci/azure-pipelines-ci.yml @@ -8,6 +8,9 @@ variables: - name: DOTNET_CLI_TELEMETRY_OPTOUT value: 'true' + - name: BLAH + value: $(PLEASE_WORK) + trigger: batch: true branches: @@ -43,6 +46,11 @@ jobs: pool: vmImage: 'macOS-10.14' steps: + - pwsh: | + Get-ChildItem -Path env: + Write-Host '$(BLAH) this is something' + displayName: Capture environment + condition: succeededOrFailed() - template: templates/ci-general.yml - job: Linux diff --git a/.vsts-ci/templates/ci-general.yml b/.vsts-ci/templates/ci-general.yml index d37ef417c5..1935988d07 100644 --- a/.vsts-ci/templates/ci-general.yml +++ b/.vsts-ci/templates/ci-general.yml @@ -3,21 +3,32 @@ steps: - pwsh: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))" displayName: Set Build Name for Non-PR condition: ne(variables['Build.Reason'], 'PullRequest') + - pwsh: | git clone https://github.com/PowerShell/PowerShellEditorServices.git ../PowerShellEditorServices Install-Module InvokeBuild -Scope CurrentUser -Force Install-Module PlatyPS -Scope CurrentUser -Force + # Build + - pwsh: | + Get-ChildItem -Path env: + Write-Host '$(PS_TEST_GITHUB_API_PAT) this is something' + displayName: Capture environment + condition: succeededOrFailed() + - pwsh: Invoke-Build + - task: PublishTestResults@2 inputs: testRunner: JUnit testResultsFiles: '**/test-results.xml' condition: succeededOrFailed() + - task: PublishBuildArtifacts@1 inputs: ArtifactName: vscode-powershell PathtoPublish: '$(Build.ArtifactStagingDirectory)' + # Rich Navigation - task: RichCodeNavIndexer@0 # Note, for now, this is Windows only. diff --git a/src/features/UpdatePowerShell.ts b/src/features/UpdatePowerShell.ts index d20fa1fb66..f5c5e81620 100644 --- a/src/features/UpdatePowerShell.ts +++ b/src/features/UpdatePowerShell.ts @@ -45,7 +45,7 @@ export class GitHubReleaseInformation { if (!response.ok) { const json = await response.json(); - throw json.message || json || "response was not ok."; + throw new Error(json.message || json || "response was not ok."); } // For preview, we grab all the releases and then grab the first prerelease. diff --git a/vscode-powershell.build.ps1 b/vscode-powershell.build.ps1 index bab5a96781..a7945ace3e 100644 --- a/vscode-powershell.build.ps1 +++ b/vscode-powershell.build.ps1 @@ -106,7 +106,7 @@ task Test Build, { return } Write-Host "`n### Running extension tests" -ForegroundColor Green - exec { & npm run test } + exec { npm run test } } task TestEditorServices {