Skip to content

Commit 3ca2609

Browse files
Fix template test scripts (#60016)
1 parent 7091e0b commit 3ca2609

File tree

7 files changed

+9
-5
lines changed

7 files changed

+9
-5
lines changed

.azure/pipelines/ci-public.yml

+2
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,8 @@ stages:
615615
-configuration Release
616616
-bl
617617
displayName: Run project template tests
618+
- powershell: . ./activate.ps1; ./src/ProjectTemplates/scripts/Run-BlazorWeb-Locally.ps1 -Verbose
619+
displayName: Run Blazor web app test script
618620

619621
artifacts:
620622
- name: Local_Windows_x64_Logs_Attempt_$(System.JobAttempt)

.azure/pipelines/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,8 @@ extends:
664664
-NoBuildDeps
665665
-configuration Release
666666
displayName: Run project template tests
667+
- powershell: . ./activate.ps1; ./src/ProjectTemplates/scripts/Run-BlazorWeb-Locally.ps1 -Verbose
668+
displayName: Run Blazor web app test script
667669

668670
artifacts:
669671
- name: Local_Windows_x64_Logs_Attempt_$(System.JobAttempt)

src/ProjectTemplates/scripts/Run-BlazorWasm-Locally.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ if ($UseProgramMain) {
7373
$templateArguments += "--use-program-main"
7474
}
7575

76-
Import-Module -Name .\Test-Template.psm1;
76+
Import-Module -Name "$PSScriptRoot/Test-Template.psm1";
7777

7878
Test-Template `
7979
-TemplateName "MyBlazorWasmApp" `

src/ProjectTemplates/scripts/Run-BlazorWeb-Locally.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
$templateArguments += "--use-program-main"
7979
}
8080

81-
Import-Module -Name .\Test-Template.psm1;
81+
Import-Module -Name "$PSScriptRoot/Test-Template.psm1";
8282

8383
Test-Template `
8484
-TemplateName "MyBlazorApp" `

src/ProjectTemplates/scripts/Run-Razor-Locally.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ if ($UseProgramMain) {
4848
$templateArguments += "--use-program-main"
4949
}
5050

51-
Import-Module -Name .\Test-Template.psm1;
51+
Import-Module -Name "$PSScriptRoot/Test-Template.psm1";
5252

5353
Test-Template `
5454
-TemplateName "MyWebApp" `

src/ProjectTemplates/scripts/Run-Starterweb-Locally.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ if ($UseProgramMain) {
4848
$templateArguments += "--use-program-main"
4949
}
5050

51-
Import-Module -Name .\Test-Template.psm1;
51+
Import-Module -Name "$PSScriptRoot/Test-Template.psm1";
5252

5353
Test-Template `
5454
-TemplateName "MyMvcApp" `

src/ProjectTemplates/scripts/Test-Template.psm1

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function Test-Template {
2525
}
2626

2727
Write-Verbose "Patching Microsoft.AspNetCore.App";
28-
$builtRuntime = Resolve-Path "$PSScriptRoot/../../../artifacts/installers/$Configuration/aspnetcore-runtime-*-dev-win-x64.zip";
28+
$builtRuntime = Resolve-Path "$PSScriptRoot/../../../artifacts/packages/$Configuration/Shipping/aspnetcore-runtime-*-dev-win-x64.zip" | Where-Object { $_ -match "aspnetcore-runtime-[0-9.]+-dev-win-x64.zip" };
2929
Write-Verbose "Patching Microsoft.AspNetCore.App from $builtRuntime";
3030
Remove-Item "$PSScriptRoot/.runtime" -Recurse -ErrorAction Ignore;
3131
Expand-Archive -Path $builtRuntime -DestinationPath "$PSScriptRoot/.runtime" -Force;

0 commit comments

Comments
 (0)