@@ -73,10 +73,8 @@ stages:
7373 Write-Verbose -Verbose "Importing PSPackageProject from: $modPath"
7474 Import-Module -Name $modPath -Force
7575 #
76- # First build for netstandard2.0 framework
76+ # Build for netstandard2.0 framework
7777 $(Build.SourcesDirectory)/build.ps1 -Build -Clean -BuildConfiguration Release -BuildFramework 'netstandard2.0'
78- # Next build for net472 framework
79- $(Build.SourcesDirectory)/build.ps1 -Build -BuildConfiguration Release -BuildFramework 'net472'
8078 displayName: Build and publish artifact
8179
8280 - pwsh : |
@@ -112,12 +110,6 @@ stages:
112110 Copy-Item -Path (Join-Path -Path $srcPath -ChildPath "DscResources") -Dest $createdSignSrcPath -Recurse -Force -Verbose
113111 Copy-Item -Path (Join-Path -Path $srcPath -ChildPath "Modules") -Dest $createdSignSrcPath -Recurse -Force -Verbose
114112
115- $net472Path = Join-Path -Path $createdSignSrcPath -ChildPath "net472"
116- if (! (Test-Path -Path $net472Path)) {
117- $null = New-Item -Path $net472Path -ItemType Directory -Verbose
118- }
119- Copy-Item -Path (Join-Path -Path $srcPath -ChildPath "net472\PowerShellGet.*") -Dest $net472Path -Force -Verbose
120-
121113 $netStandardPath = Join-Path -Path $createdSignSrcPath -ChildPath "netstandard2.0"
122114 if (! (Test-Path -Path $netStandardPath)) {
123115 $null = New-Item -Path $netStandardPath -ItemType Directory -Verbose
@@ -186,21 +178,6 @@ stages:
186178 if (! (Test-Path -Path $thirdPartySignSrcPath)) {
187179 $null = New-Item -Path $thirdPartySignSrcPath -ItemType Directory -Verbose
188180 }
189-
190- # Net472 directory
191- $net472Path = Join-Path -Path $thirdPartySignSrcPath -ChildPath "net472"
192- if (! (Test-Path -Path $net472Path)) {
193- $null = New-Item -Path $net472Path -ItemType Directory -Verbose
194- }
195- Get-ChildItem -Path (Join-Path -Path $srcPath -ChildPath "net472") -Filter '*.dll' | Foreach-Object {
196- if ($_.Name -ne 'PowerShellGet.dll') {
197- $sig = Get-AuthenticodeSignature -FilePath $_.FullName
198- if ($sig.Status -ne 'Valid' -or $sig.SignerCertificate.Subject -notlike '*Microsoft*' -or $sig.SignerCertificate.Issuer -notlike '*Microsoft Code Signing PCA*') {
199- # Copy for third party signing
200- Copy-Item -Path $_.FullName -Dest $net472Path -Force -Verbose
201- }
202- }
203- }
204181
205182 # NetStandard directory
206183 $netStandardPath = Join-Path -Path $thirdPartySignSrcPath -ChildPath "netstandard2.0"
@@ -256,21 +233,6 @@ stages:
256233 # en-US
257234 Copy-Item -Path (Join-Path -Path $srcPath -ChildPath "en-US") -Dest $signOutPath -Recurse
258235
259- # Net472 directory
260- $net472SignedOutPath = Join-Path -Path $signOutPath -ChildPath "net472"
261- if (! (Test-Path -Path $net472SignedOutPath)) {
262- $null = New-Item -Path $net472SignedOutPath -ItemType Directory -Verbose
263- }
264- Get-ChildItem -Path (Join-Path -Path $srcPath -ChildPath "net472") -Filter '*.dll' | Foreach-Object {
265- if ($_.Name -ne 'PowerShellGet.dll') {
266- $sig = Get-AuthenticodeSignature -FilePath $_.FullName
267- if ($sig.Status -eq 'Valid' -and ($sig.SignerCertificate.Subject -like '*Microsoft*' -and $sig.SignerCertificate.Issuer -like '*Microsoft Code Signing PCA*')) {
268- # Copy already signed files directly to output
269- Copy-Item -Path $_.FullName -Dest $net472SignedOutPath -Force -Verbose
270- }
271- }
272- }
273-
274236 # NetStandard directory
275237 $netStandardSignedOutPath = Join-Path -Path $signOutPath -ChildPath "netstandard2.0"
276238 if (! (Test-Path -Path $netStandardSignedOutPath)) {
0 commit comments