Skip to content

Commit

Permalink
Fix null errors in SetTestPipelineVersion, Update Package Upload step…
Browse files Browse the repository at this point in the history
… name.
  • Loading branch information
chidozieononiwu committed Jul 5, 2022
1 parent 160c203 commit ec310dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions eng/common/scripts/SetTestPipelineVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ param (

. (Join-Path $PSScriptRoot common.ps1)

$newVersion = [AzureEngSemanticVersion]::new("1.0.0")
$latestTags = git tag -l "${PackageName}_*"
$semVars = @()

Expand All @@ -19,10 +20,13 @@ Foreach ($tags in $latestTags)
$semVars += $tags.Replace("${PackageName}_", "")
}

$semVarsSorted = [AzureEngSemanticVersion]::SortVersionStrings($semVars)
LogDebug "Last Published Version $($semVarsSorted[0])"
if ($semVars -and $semVars.Length -gt 0)
{
$semVarsSorted = [AzureEngSemanticVersion]::SortVersionStrings($semVars)
LogDebug "Last Published Version $($semVarsSorted[0])"
$newVersion = [AzureEngSemanticVersion]::new($semVarsSorted[0])
}

$newVersion = [AzureEngSemanticVersion]::new($semVarsSorted[0])
$newVersion.PrereleaseLabel = $newVersion.DefaultPrereleaseLabel
$newVersion.PrereleaseNumber = $BuildID

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@ jobs:
publishFeedCredentials: Nuget.org

- publish: '${{ parameters.ArtifactsPath }}'
displayName: Publish Packages
displayName: Upload Packages to Artifacts
artifact: packages
condition: succeeded()

0 comments on commit ec310dc

Please sign in to comment.