Skip to content

Commit f70e834

Browse files
committed
Finish moving to Release configuration
1 parent a71cbd8 commit f70e834

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

PowerShellStandard.psm1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ function Start-Build {
1212
Pop-Location
1313
}
1414
}
15+
16+
# push into dotnetTemplate and build
17+
try {
18+
$templateBase = Join-Path $srcBase dotnetTemplate
19+
Push-Location $templateBase
20+
dotnet restore
21+
dotnet build --configuration Release
22+
}
23+
finally {
24+
Pop-Location
25+
}
1526
}
1627

1728
function Start-Clean {

src/3/PowerShellStandard.Library.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</references>
1818
</metadata>
1919
<files>
20-
<file src="obj/Debug/netstandard2.0/System.Management.Automation.dll" target="lib/netstandard2.0" />
20+
<file src="obj/Release/netstandard2.0/System.Management.Automation.dll" target="lib/netstandard2.0" />
2121
</files>
2222
</package>
2323

test/3/PSS3.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Describe "PowerShell Standard 3" {
22
BeforeAll {
3-
$cmdletAssembly = "bin/Debug/netstandard2.0/Demo.Cmdlet.dll"
3+
$cmdletAssembly = "bin/Release/netstandard2.0/Demo.Cmdlet.dll"
44
$assemblyPath = Join-Path "$PSScriptRoot" $cmdletAssembly
55
$PSBin = (Get-Process -id $PID).MainModule.FileName
66
}
77
It "Can build a reference assembly" {
88
dotnet restore
9-
dotnet build
9+
dotnet build --configuration Release
1010
$assemblyPath | Should Exist
1111
}
1212
It "Can execute the compiled cmdlet" {

test/5/PSS5.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Describe 'PowerShell Standard 5' {
1919
try {
2020
Push-Location $PSScriptRoot
2121
dotnet restore
22-
dotnet build
22+
dotnet build --configuration Release
2323
$assemblyPath | Should -Exist
2424
}
2525
finally {

test/dotnetTemplate/dotnetTemplate.Tests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Describe "PowerShell Standard C# Module Template" {
22
Context "Targeting PowerShell Standard 5.1" {
33
BeforeAll {
44
$testFolder = "./foo"
5-
$publishDir = "./bin/Debug/netstandard2.0/publish/"
5+
$publishDir = "./bin/Release/netstandard2.0/publish/"
66
$PSBin = (Get-Process -id $PID).MainModule.FileName
77

88
$FavoriteNumber = 4
@@ -15,7 +15,7 @@ Describe "PowerShell Standard C# Module Template" {
1515
dotnet new psmodule
1616
}
1717
It "Can package the module that was created" {
18-
dotnet publish
18+
dotnet publish --configuration Release
1919
$LASTEXITCODE | Should -Be 0
2020
Test-Path $publishDir | Should -BeTrue
2121
Test-Path foo.csproj | Should -BeTrue
@@ -41,7 +41,7 @@ Describe "PowerShell Standard C# Module Template" {
4141
Context "Targeting PowerShell Standard 3" {
4242
BeforeAll {
4343
$testFolder = "./foo"
44-
$publishDir = "./bin/Debug/netstandard2.0/publish/"
44+
$publishDir = "./bin/Release/netstandard2.0/publish/"
4545
$PSBin = (Get-Process -id $PID).MainModule.FileName
4646

4747
$FavoriteNumber = 4
@@ -54,7 +54,7 @@ Describe "PowerShell Standard C# Module Template" {
5454
dotnet new psmodule -v 3.0.0-preview-02
5555
}
5656
It "Can package the module that was created" {
57-
dotnet publish
57+
dotnet publish --configuration Release
5858
$LASTEXITCODE | Should -Be 0
5959
Test-Path $publishDir | Should -BeTrue
6060
Test-Path foo.csproj | Should -BeTrue

0 commit comments

Comments
 (0)