@@ -55,6 +55,10 @@ stages:
5555 Remove-Item -Path $(Build.SourcesDirectory)/Microsoft.PowerShell.TextUtility -Recurse -Force -ErrorAction Ignore
5656 .\build.ps1 -Clean
5757 Remove-Item .\out\*.pdb
58+ $packageVersion = (Import-PowerShellDataFile $(Build.SourcesDirectory)/out/Microsoft.PowerShell.TextUtility/Microsoft.PowerShell.TextUtility.psd1).ModuleVersion
59+ $vstsCommandString = "vso[task.setvariable variable=PackageVersion]$packageVersion"
60+ Write-Host ("sending " + $vstsCommandString)
61+ Write-Host "##$vstsCommandString"
5862 displayName: Build
5963 - publish : " out/"
6064 artifact : out
@@ -94,27 +98,28 @@ stages:
9498 # decides if the task should use minimatch for the pattern matching.
9599 # https://github.com/isaacs/minimatch#features
96100 useMinimatch : false
97-
98- - ${{ if ne(variables.SkipSigning, 'True') }} :
99- - template : Sbom.yml@ComplianceRepo
100- parameters :
101- BuildDropPath : $(Build.SourcesDirectory)/Microsoft.PowerShell.TextUtility
102- Build_Repository_Uri : ' https://github.com/powershell/textutility'
103-
101+
102+ - template : Sbom.yml@ComplianceRepo
103+ parameters :
104+ BuildDropPath : $(Build.SourcesDirectory)/out/Microsoft.PowerShell.TextUtility
105+ Build_Repository_Uri : ' https://github.com/powershell/textutility'
106+ PackageName : ' Microsoft.PowerShell.TextUtility'
107+ PackageVersion : $(PackageVersion)
108+
104109 - pwsh : |
105- New-Item -Path $(Build.SourcesDirectory)/SignedZip -ItemType Directory -ErrorAction Ignore
106- Compress-Archive -Path $(Build.SourcesDirectory)/Microsoft.PowerShell.TextUtility -DestinationPath $(Build.SourcesDirectory)/SignedZip/Microsoft.PowerShell.TextUtility.zip -Force
110+ New-Item -Path $(Build.SourcesDirectory)/out/ SignedZip -ItemType Directory -ErrorAction Ignore
111+ Compress-Archive -Path $(Build.SourcesDirectory)/Microsoft.PowerShell.TextUtility -DestinationPath $(Build.SourcesDirectory)/out/ SignedZip/Microsoft.PowerShell.TextUtility.zip -Force
107112 displayName: 'Compress archive'
108113 condition: succeededOrFailed()
109114
110115 - task : PublishPipelineArtifact@1
111116 inputs :
112- targetpath : $(Build.SourcesDirectory)/Microsoft.PowerShell.TextUtility
117+ targetpath : $(Build.SourcesDirectory)/out/ Microsoft.PowerShell.TextUtility
113118 artifactName : Signed
114119
115120 - task : PublishPipelineArtifact@1
116121 inputs :
117- targetpath : $(Build.SourcesDirectory)/SignedZip
122+ targetpath : $(Build.SourcesDirectory)/out/ SignedZip
118123 artifactName : SignedZip
119124
120125- stage : compliance
0 commit comments