Welcome to mirror list, hosted at ThFree Co, Russian Federation.

generate-sbom-prep.ps1 « common « eng - github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a733a8885824a9b304787dc1e158301f24025cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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"