Skip to content

Commit

Permalink
Revert "Mitigate relative path calculation error on multiple iterations"
Browse files Browse the repository at this point in the history
This reverts commit 45baedd990c6a3085742a38a4891d8706a93be77.
  • Loading branch information
danieljurek authored and azure-sdk committed Oct 13, 2021
1 parent eb35819 commit 9946eda
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions eng/common/scripts/Save-Package-Properties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,8 @@ function SetOutput($outputPath, $incomingPackageSpec) {
else
{
$outputObject = $incomingPackageSpec

# Set file paths to relative paths. Only do this if there is no existing
# package info json file as running this multiple times can create
# unexpected relative paths in some scenarios.
$outputObject.DirectoryPath = GetRelativePath $outputObject.DirectoryPath
$outputObject.ReadMePath = GetRelativePath $outputObject.ReadMePath
$outputObject.ChangeLogPath = GetRelativePath $outputObject.ChangeLogPath
}


if ($addDevVersion)
{
Expand All @@ -65,6 +58,11 @@ function SetOutput($outputPath, $incomingPackageSpec) {
$outputObject.DevVersion = $incomingPackageSpec.Version
}

# Set file paths to relative paths
$outputObject.DirectoryPath = GetRelativePath $outputObject.DirectoryPath
$outputObject.ReadMePath = GetRelativePath $outputObject.ReadMePath
$outputObject.ChangeLogPath = GetRelativePath $outputObject.ChangeLogPath

Set-Content `
-Path $outputPath `
-Value (ConvertTo-Json -InputObject $outputObject -Depth 100)
Expand Down

0 comments on commit 9946eda

Please sign in to comment.