forked from microsoft/iqsharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.ps1
35 lines (30 loc) · 1.33 KB
/
bootstrap.ps1
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
31
32
33
34
35
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Fetch TypeScript definitions
Push-Location (Join-Path $PSScriptRoot src/Kernel)
if (Get-Command npm -ErrorAction SilentlyContinue) {
"##[info]Installing npm dependencies" | Write-Host
npm install | Write-Host
"==> npm install complete <==" | Write-Host
} else {
"##[info]npm not installed. Will skip npm install" | Write-Host
}
Pop-Location
# If the compiler constants include TELEMETRY, explicitly add the Aria telemetry package to the iqsharp tool:
if (($Env:ASSEMBLY_CONSTANTS -ne $null) -and ($Env:ASSEMBLY_CONSTANTS.Contains("TELEMETRY"))) {
$project = (Join-Path $PSScriptRoot 'src\Tool\Tool.csproj')
$pkg = "Microsoft.Applications.Events.Server.Core2"
Write-Host "##[info]Adding $pkg to $project"
dotnet add $project `
package $pkg `
--no-restore `
--version "$Env:BUILD_ARIA_VERSION"
}
# Install Python requirements for building/testing
if ($Env:ENABLE_PYTHON -ne "false") {
$pythonVersion = python --version
$requirements = Join-Path $PSScriptRoot 'src\Python\requirements.txt'
"##[info]Installing requirements from '$requirements' using version: '{$pythonVersion}'" | Write-Host
pip install -r $requirements | Write-Host
"==> pip install complete <==" | Write-Host
}