Skip to content

Commit

Permalink
#3590 Get-BcNuGetPackageId uses wrong formatting for version (#3610)
Browse files Browse the repository at this point in the history
Get-BcNuGetPackageId uses wrong formatting for version . instead of -

#3590

Co-authored-by: Freddy Kristiansen <[email protected]>
  • Loading branch information
lktraser and freddydk authored Sep 5, 2024
1 parent 0bd696a commit 9aeb171
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion NuGet/Get-BcNuGetPackageId.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ function Get-BcNuGetPackageId {
if ($nname -eq '') { throw "App name is invalid: '$name'" }
if ($npublisher -eq '') { throw "App publisher is invalid: '$publisher'" }

$packageIdTemplate = $packageIdTemplate.replace('{id}',$id).replace('{publisher}',$npublisher).replace('{tag}',$tag).replace('{version}',$version).replace('..','.').TrimEnd('.')
$version = $version.Replace('..', '.').TrimEnd('.').Replace('.', '-');

$packageIdTemplate = $packageIdTemplate.replace('{id}',$id).replace('{publisher}',$npublisher).replace('{tag}',$tag).replace('{version}',$version)
# Max. Length of NuGet Package Id is 100 - we shorten the name part of the id if it is too long
$packageId = $packageIdTemplate.replace('{name}',$nname)
if ($packageId.Length -ge 100) {
Expand Down

0 comments on commit 9aeb171

Please sign in to comment.