dotnet-installer/eng/common/generate-sbom-prep.ps1
dotnet-maestro[bot] fb9df6f93f
Update dependencies from https://github.com/dotnet/arcade build 20220210.7 (#13219)
Microsoft.DotNet.CMake.Sdk , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Arcade.Sdk
 From Version 7.0.0-beta.22109.1 -> To Version 7.0.0-beta.22110.7

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.22104.1 -> To Version 1.0.0-beta.22109.1 (parent: Microsoft.DotNet.Arcade.Sdk

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2022-02-11 08:15:13 -08:00

19 lines
719 B
PowerShell

Param(
[Parameter(Mandatory=$true)][string] $ManifestDirPath # Manifest directory where sbom will be placed
)
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"