FAKE icon indicating copy to clipboard operation
FAKE copied to clipboard

Release notes not parsing the last version

Open NightOwl888 opened this issue 2 years ago • 3 comments

Description

I am attempting to patch an older version (1.9.1.1) and re-release it (1.9.1.2). The release notes have 2 higher version numbers, 1.9.3, and 1.9.4. However, the release notes logic always picks the highest version from the file instead of the one at the top of the file.

I thought it might be related to line endings or something like that, but I have checked and they are all the same.

I haven't found any other solution than to delete version 1.9.3 and 1.9.4 from the file before the build. Is there a way to do this release without destroying the release notes?

Repro steps

Please provide the steps required to reproduce the problem

1. Step A
#### 1.9.1.2 - May 27, 2022
* Build with .NET SDK 6.0.300

#### 1.9.4 - Nov 22, 2021
* New version of OpenNLP 1.9.4
* Build with .NET 6.0

#### 1.9.3 - April 11, 2021
* New version of OpenNLP 1.9.3
* 32 dlls compiled instead of 2
* New jar dependency detection using jdep

#### 1.9.1.1 - April 5, 2021
* Sign assemblies

#### 1.9.1 - Oct 22, 2019
* New version of OpenNLP 1.9.1

#### 1.8.4 - Jan 14, 2018
* New version of OpenNLP 1.8.4
* Latest IKVM 8.1.5717.0

#### 1.6.0 - July 13 2015
* New version of OpenNLP 1.6

#### 1.6.0-rc2 - February 13 2015
* New version of OpenNLP 1.6-rc2
* Repository migrated to paket
* New IKVM for Java 8 -rc1

#### 1.5.3 - July 13 2014
* Initial port of OpenNLP 1.5.3
  1. Step B
// Read additional information from the release notes document
let release = ReleaseNotes.load "RELEASE_NOTES.md"

Expected behavior

The release version will be the one at the top of the file (or at least with the latest date).

Actual behavior

The release version is always the highest version number in the file, even if that is not the version being released.

Known workarounds

Deleting the release notes for the higher releases works, but is a poor solution.

Related information

  • Operating system: Windows
  • .NET Framework 4.6.1

FAKE 5 - F# Make (5.20.4) (this line is written to standard error, see https://github.com/fsharp/FAKE/issues/2066) FakePath: F:\Users\shad.nuget\packages\fake-cli\5.20.4\tools\netcoreapp2.1\any\Fake.Runtime.dll Paket.Core: 5.257.0

NightOwl888 avatar May 27 '22 02:05 NightOwl888

Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project!

github-actions[bot] avatar May 27 '22 02:05 github-actions[bot]

I ran into this after updating Fake.Core.ReleaseNotes from 5.20.4 to 5.22.0 -- no problem grabbing the first listed version from the release notes file before that update.

DalekBaldwin avatar May 27 '22 19:05 DalekBaldwin

Thanks for reporting. The ReleaseNotes module in FAKE follows guidelines in keepachangelog site. And changelog files should be ordered in chronological order based on the version, in which entries are ordered by version. So latest version comes first.

If you would like more control on which entry to get as latest, you can use parseAll method which parses the complete RELEASE_NOTES file and returns all the entirs in it. After that you can select the entry you want, for example based on the date for your specific case:

let releaseByDate = 
    ReleaseNotes.load "RELEASE_NOTES.md"
    |> List.sortBy (fun x -> x.Date)

yazeedobaid avatar Jul 25 '22 08:07 yazeedobaid

closing this due to inactivity, please feel free to re-open or open a new issue if anything still needs to be addressed.

yazeedobaid avatar Oct 21 '22 14:10 yazeedobaid