11param  (
22    [string ]$OutputPath , 
33    [string ]$Version  =  $null , 
4-     [bool ]$IncludeTestPackage  =  $false 
4+     [switch ]$IncludeTestPackage  =  $false 
55)
66
77#  if version is not set, then run a script to get it
@@ -22,7 +22,7 @@ if ($null -eq $PackageVersion)
2222Write-Host  " Using version $PackageVersion " 
2323
2424#  Write-Information "Building Report Publishing task"
25- Push -Location$PSScriptRoot / tasks/ PublishAIEvaluationReport
25+ Set -Location$PSScriptRoot / tasks/ PublishAIEvaluationReport
2626npm install -- omit= dev
2727#  Copy task files to dist folder
2828New-Item  - ItemType Directory - Path ./ dist - Force
@@ -32,23 +32,26 @@ copy-item -Path ./package.json -Destination ./dist/ -Force
3232copy-item  - Path ./ node_modules - Destination ./ dist/ node_modules - Force - Recurse
3333
3434#  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 
3636
3737@ {  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+      
4040#  Write-Information "Building Extension Package" 
4141Set-Location  $PSScriptRoot 
4242npm install
4343npx tsc - b
4444npx vite build
45+     
46+ #  Copy LICENSE file from the root
47+ copy-item  - Path $PSScriptRoot / ../ ../ ../ ../ ../ LICENSE - Destination .  - Force
4548
4649npx tfx- cli extension create -- overrides- file $PSScriptRoot / override.json -- output- path $OutputPath 
4750
4851if  ($true  -eq  $IncludeTestPackage ) {
4952    @ {  version  =  $PackageVersion 
5053        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 
5255
5356    #  Build Preview version of the extension for testing
5457    npx tfx- cli extension create -- overrides- file $PSScriptRoot / override.json -- output- path $OutputPath 
0 commit comments