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

github.com/dotnet/spa-templates.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordougbu <dougbu@users.noreply.github.com>2022-07-25 11:04:45 +0300
committerGitHub <noreply@github.com>2022-07-25 11:04:45 +0300
commita121de9c444631bbf457cb1f3d4e42d629b83a5f (patch)
treef701375566a719e861029ee5718c418f86a580f1
parent7aa1fe7ae8277258fb7b80e4fc4f181345c54bbf (diff)
Sync shared code from arcadegithub-action/sync-arcade-1658736285
-rw-r--r--eng/common/generate-sbom-prep.ps12
-rw-r--r--eng/common/generate-sbom-prep.sh12
2 files changed, 14 insertions, 0 deletions
diff --git a/eng/common/generate-sbom-prep.ps1 b/eng/common/generate-sbom-prep.ps1
index a733a88..3e5c1c7 100644
--- a/eng/common/generate-sbom-prep.ps1
+++ b/eng/common/generate-sbom-prep.ps1
@@ -2,6 +2,8 @@ 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))
diff --git a/eng/common/generate-sbom-prep.sh b/eng/common/generate-sbom-prep.sh
index f6c7745..d5c76dc 100644
--- a/eng/common/generate-sbom-prep.sh
+++ b/eng/common/generate-sbom-prep.sh
@@ -2,6 +2,18 @@
source="${BASH_SOURCE[0]}"
+# resolve $SOURCE until the file is no longer a symlink
+while [[ -h $source ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+
+ # if $source was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+. $scriptroot/pipeline-logging-functions.sh
+
manifest_dir=$1
if [ ! -d "$manifest_dir" ] ; then