dotnet-installer/eng/common/generate-sbom-prep.sh
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

22 lines
755 B
Bash

#!/usr/bin/env bash
source="${BASH_SOURCE[0]}"
manifest_dir=$1
if [ ! -d "$manifest_dir" ] ; then
mkdir -p "$manifest_dir"
echo "Sbom directory created." $manifest_dir
else
Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder."
fi
artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM"
echo "Artifact name before : "$artifact_name
# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts.
safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}"
echo "Artifact name after : "$safe_artifact_name
export ARTIFACT_NAME=$safe_artifact_name
echo "##vso[task.setvariable variable=ARTIFACT_NAME]$safe_artifact_name"
exit 0