Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release notes not parsing the last version #2680

Closed
NightOwl888 opened this issue May 27, 2022 · 4 comments
Closed

Release notes not parsing the last version #2680

NightOwl888 opened this issue May 27, 2022 · 4 comments
Labels
waiting for author Some information or action was requested and it needs to be addressed. Or a response from author

Comments

@NightOwl888
Copy link

NightOwl888 commented May 27, 2022

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 #2066)
FakePath: F:\Users\shad.nuget\packages\fake-cli\5.20.4\tools\netcoreapp2.1\any\Fake.Runtime.dll
Paket.Core: 5.257.0

@github-actions
Copy link
Contributor

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

@DalekBaldwin
Copy link

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.

NightOwl888 added a commit to NightOwl888/OpenNLP.NET that referenced this issue Jun 1, 2022
… file because of a bug in Fake.Core.ReleaseNotes that prevents the version from being lowered: fsprojects/FAKE#2680
@yazeedobaid
Copy link
Collaborator

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 yazeedobaid added waiting for author Some information or action was requested and it needs to be addressed. Or a response from author and removed waiting for author Some information or action was requested and it needs to be addressed. Or a response from author labels Jul 25, 2022
sergey-tihon added a commit to sergey-tihon/OpenNLP.NET that referenced this issue Aug 23, 2022
* global.json: Allow any .NET Core 6.x SDK

* Changed .NET Framework target from net45 to net461, added target framework folder to NuGet package

* Reverted OpenNLP to version 1.9.1

* RELEASE_NOTES.md: Updated to 1.9.1.2-preview0001

* TO REVERT: RELEASE_NOTES.md: Temporarily removed 1.9.3 and 1.9.4 from file because of a bug in Fake.Core.ReleaseNotes that prevents the version from being lowered: fsprojects/FAKE#2680

* Updated IKVM to 8.2.0-prerelease0392 and updated build/tests

* .github/workflows/main.yml: Added .NET Core 3.1 SDK

* .github/workflows/main.yml: Build on windows-latest, test windows-latest/ubuntu-latest/macOS-latest

* Removed dependency on NUnit.ConsoleRunner

* feat: update paket and fake, run fake  on .net 6

* feat: update IKVM & OpenNLP

* fix: typos

* fix: nostdlib

* feat: update ikvm to release version

* fix: ikvmc errors

* fix: release notes and dependencies file

* feat: dependencies update

* fix: revert opennlp to v1.9.4

* fix: simplify build script

Co-authored-by: Shad Storhaug <[email protected]>
@yazeedobaid
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for author Some information or action was requested and it needs to be addressed. Or a response from author
Projects
None yet
Development

No branches or pull requests

3 participants