dotnet-installer/eng/common/generate-sbom-prep.ps1
dotnet-maestro[bot] 2d4c5adaeb Update dependencies from https://github.com/dotnet/arcade build 20220719.9
Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.CMake.Sdk
 From Version 7.0.0-beta.22368.5 -> To Version 7.0.0-beta.22369.9

Dependency coherency updates

Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
 From Version 1.2.0-beta-22367-01 -> To Version 1.2.0-beta-22368-02 (parent: Microsoft.DotNet.Arcade.Sdk
2022-07-20 12:40:03 +00:00

21 lines
767 B
PowerShell

Param(
[Parameter(Mandatory=$true)][string] $ManifestDirPath # Manifest directory where sbom will be placed
)
. $PSScriptRoot\pipeline-logging-functions.ps1
Write-Host "Creating dir $ManifestDirPath"
# create directory for sbom manifest to be placed
if (!(Test-Path -path $ManifestDirPath))
{
New-Item -ItemType Directory -path $ManifestDirPath
Write-Host "Successfully created directory $ManifestDirPath"
}
else{
Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder."
}
Write-Host "Updating artifact name"
$artifact_name = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" -replace '["/:<>\\|?@*"() ]', '_'
Write-Host "Artifact name $artifact_name"
Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$artifact_name"