Skip to content

Commit

Permalink
Merge pull request #940 from microsoftgraph/dev
Browse files Browse the repository at this point in the history
Merge dev
  • Loading branch information
zengin committed Mar 25, 2021
2 parents 83f5b32 + b330b34 commit 51b6c0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/GetNugetPackageVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ Param(

Write-Host "Get the NuGet package version and set it in the global variable: VERSION_STRING" -ForegroundColor Magenta

$nugetPackageName = (Get-ChildItem $packageDirPath | Where Name -match Microsoft.Graph).Name
$nugetPackageName = (Get-ChildItem (Join-Path $packageDirPath *.nupkg) -Exclude *.symbols.nupkg).Name

Write-Host "Found NuGet package: $nugetPackageName" -ForegroundColor Magenta

## Extracts the package version from nupkg file name.
$packageVersion = $nugetPackageName -replace "^(.*?)\.((?:\.?[0-9]+){3,}(?:[-a-z]+)?)\.nupkg$", '$2'

Write-Host "##vso[task.setvariable variable=VERSION_STRING]$($packageVersion)";
Write-Host "Updated the VERSION_STRING environment variable with the package version value '$packageVersion'." -ForegroundColor Green
Write-Host "Updated the VERSION_STRING environment variable with the package version value '$packageVersion'." -ForegroundColor Green

0 comments on commit 51b6c0d

Please sign in to comment.