Skip to content

Commit

Permalink
Updated Export-UnreleasedNotes
Browse files Browse the repository at this point in the history
  • Loading branch information
codaamok committed Sep 20, 2022
1 parent 3118f46 commit 65a2136
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## [Unreleased]
### Fixed
- `Export-UnreleasedNotes` incorrectly checked `IsPresent` property of a boolean for param `-NewRelease`. This param was once a switch, but then change to a bool.

## [5.0.1] - 2022-04-20
### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/Public/Build/Export-UnreleasedNotes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Export-UnreleasedNotes {
}

if ($EmptyChangeLog -eq $true -Or $ReleaseNotes.Count -eq 0) {
if ($NewRelease.IsPresent) {
if ($NewRelease) {
throw "Can not build with empty Unreleased section in the change log"
}
else {
Expand Down
2 changes: 1 addition & 1 deletion src/Public/Build/Get-BuildVersionNumber.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function Get-BuildVersionNumber {
Write-Verbose ("Manifest version: {0}" -f $ManifestData.ModuleVersion) -Verbose

if (-not $VersionToBuild) {
if ($NewRelease.IsPresent) {
if ($NewRelease) {
# Try and piece together an understanding from the module manifest, PowerShell Gallery, and the change log, as to what the next version number should be

# If the last released version in the change log and latest version available in the PowerShell gallery do not match, throw an exception - get them level!
Expand Down

0 comments on commit 65a2136

Please sign in to comment.