1
1
param (
2
2
[string ]$OutputPath ,
3
3
[string ]$Version = $null ,
4
- [bool ]$IncludeTestPackage = $false
4
+ [switch ]$IncludeTestPackage = $false
5
5
)
6
6
7
7
# if version is not set, then run a script to get it
@@ -22,7 +22,7 @@ if ($null -eq $PackageVersion)
22
22
Write-Host " Using version $PackageVersion "
23
23
24
24
# Write-Information "Building Report Publishing task"
25
- Push -Location $PSScriptRoot / tasks/ PublishAIEvaluationReport
25
+ Set -Location $PSScriptRoot / tasks/ PublishAIEvaluationReport
26
26
npm install -- omit= dev
27
27
# Copy task files to dist folder
28
28
New-Item - ItemType Directory - Path ./ dist - Force
@@ -32,23 +32,26 @@ copy-item -Path ./package.json -Destination ./dist/ -Force
32
32
copy-item - Path ./ node_modules - Destination ./ dist/ node_modules - Force - Recurse
33
33
34
34
# remove the test files from resolve package because they are currently breaking vsix signing (zero length)
35
- remove-item - Path ./ dist/ node_modules/ resolve/ test - Recurse - Force
35
+ remove-item - Path ./ dist/ node_modules/ resolve/ test - Recurse - Force - ErrorAction SilentlyContinue
36
36
37
37
@ { version = $PackageVersion
38
- public = $true } | ConvertTo-Json - Compress | Out-File - FilePath $PSScriptRoot / override.json
39
-
38
+ public = $true } | ConvertTo-Json - Compress | Out-File - FilePath $PSScriptRoot / override.json - Encoding ascii
39
+
40
40
# Write-Information "Building Extension Package"
41
41
Set-Location $PSScriptRoot
42
42
npm install
43
43
npx tsc - b
44
44
npx vite build
45
+
46
+ # Copy LICENSE file from the root
47
+ copy-item - Path $PSScriptRoot / ../ ../ ../ ../ ../ LICENSE - Destination . - Force
45
48
46
49
npx tfx- cli extension create -- overrides- file $PSScriptRoot / override.json -- output- path $OutputPath
47
50
48
51
if ($true -eq $IncludeTestPackage ) {
49
52
@ { version = $PackageVersion
50
53
id = " microsoft-extensions-ai-evaluation-report-test"
51
- name = " [TEST] Azure DevOps AI Evaluation Report" } | ConvertTo-Json - Compress | Out-File - FilePath $PSScriptRoot / override.json
54
+ name = " [TEST] Azure DevOps AI Evaluation Report" } | ConvertTo-Json - Compress | Out-File - FilePath $PSScriptRoot / override.json - Encoding ascii
52
55
53
56
# Build Preview version of the extension for testing
54
57
npx tfx- cli extension create -- overrides- file $PSScriptRoot / override.json -- output- path $OutputPath
0 commit comments