Skip to content

Commit

Permalink
!deploy v2.27.0 - fix for #185, feature for #186
Browse files Browse the repository at this point in the history
  • Loading branch information
scrthq committed May 15, 2019
1 parent d8f7ab6 commit 155a4b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion psake.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 155a4b1

Please sign in to comment.