From 155a4b1c26fb612ac50f4296cd08e25e267001b6 Mon Sep 17 00:00:00 2001 From: Nate Ferrell Date: Wed, 15 May 2019 12:38:55 -0500 Subject: [PATCH] !deploy v2.27.0 - fix for #185, feature for #186 --- psake.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/psake.ps1 b/psake.ps1 index 8cf3ca88..f18b9501 100644 --- a/psake.ps1 +++ b/psake.ps1 @@ -374,7 +374,9 @@ $deployScriptBlock = { $commitVer = $commParsed.Matches.Value.Trim().Replace('v','') } $curVer = (Get-Module $env:BHProjectName).Version - $nextGalVer = Get-NextNugetPackageVersion -Name $env:BHProjectName -PackageSourceUrl 'https://www.powershellgallery.com/api/v2/' + $galVer = (Find-Module $env:BHProjectName -Repository PSGallery).Version.ToString() + $galVerSplit = $galVer.Split('.') + $nextGalVer = [System.Version](($galVerSplit[0..($galVerSplit.Count - 2)] -join '.') + '.' + ([int]$galVerSplit[-1] + 1)) $versionToDeploy = if ($commitVer -and ([System.Version]$commitVer -lt $nextGalVer)) { Write-Host -ForegroundColor Yellow "Version in commit message is $commitVer, which is less than the next Gallery version and would result in an error. Possible duplicate deployment build, skipping module bump and negating deployment"