Skip to content

Commit

Permalink
fix version...
Browse files Browse the repository at this point in the history
  • Loading branch information
matthid committed Jul 3, 2019
1 parent 388fd8f commit 9f47e9c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Notes

## 5.12.3 - 2019-07-03
## 5.15.3 - 2019-07-03

* BUGFIX: Disable fast restore for MSBuild version < 15.8 - https://github.com/fsprojects/Paket/pull/3611

Expand Down
31 changes: 26 additions & 5 deletions src/test/Fake.Core.UnitTests/Fake.Core.ReleaseNotes.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@ open Expecto
[<Tests>]
let tests =
testList "Fake.Core.ReleaseNotes.Tests" [
testCase "Test that we can handle same day releases" <| fun _ ->
let releaseNotesLines = [
"# Release Notes"
""
"## 5.15.3 - 2019-07-03"
""
"* BUGFIX: Disable fast restore for MSBuild version < 15.8 - https://github.com/fsprojects/Paket/pull/3611"
""
"## 5.15.2 - 2019-07-03"
""
"* BUGFIX: Fast Restore (bugfix from paket) - https://github.com/fsprojects/Paket/pull/3608"
""
]
let releaseNotes = ReleaseNotes.parse releaseNotesLines

let (expected:ReleaseNotes.ReleaseNotes) =
// For historic reasons notes get appended a "."
{ AssemblyVersion = "5.15.3"; NugetVersion = "5.15.3"; SemVer = SemVer.parse "5.15.3"; Date = Some (System.DateTime(2019,07,3)); Notes = ["BUGFIX: Disable fast restore for MSBuild version < 15.8 - https://github.com/fsprojects/Paket/pull/3611"] }

Expect.equal releaseNotes expected "Simple parse failure"

testCase "Test that we can parse simple release notes" <| fun _ ->
let releaseNotesLines = [
"* 1.0.0 - Initial version"
Expand All @@ -17,7 +38,7 @@ let tests =
// For historic reasons notes get appended a "."
{ AssemblyVersion = "1.1.0"; NugetVersion = "1.1.0"; SemVer = SemVer.parse "1.1.0"; Date = None; Notes = ["First change."] }

Expect.equal expected releaseNotes "Simple parse failure"
Expect.equal releaseNotes expected "Simple parse failure"

testCase "Test that we can parse simple release notes (reversed)" <| fun _ ->
let releaseNotesLines = [
Expand All @@ -30,7 +51,7 @@ let tests =
// For historic reasons notes get appended a "."
{ AssemblyVersion = "1.1.0"; NugetVersion = "1.1.0"; SemVer = SemVer.parse "1.1.0"; Date = None; Notes = ["First change."] }

Expect.equal expected releaseNotes "Simple parse failure"
Expect.equal releaseNotes expected "Simple parse failure"

testCase "Test that we can parse complex release notes" <| fun _ ->
let releaseNotesLines = [
Expand All @@ -47,7 +68,7 @@ let tests =
let (expected:ReleaseNotes.ReleaseNotes) =
{ AssemblyVersion = "1.1.0"; NugetVersion = "1.1.0"; SemVer = SemVer.parse "1.1.0"; Date = Some (System.DateTime(2017,04,12)); Notes = ["- Some change 3"; "- Some change 4"] }

Expect.equal expected releaseNotes "Simple parse failure"
Expect.equal releaseNotes expected "Simple parse failure"

testCase "Test that we can parse complex release notes (reversed)" <| fun _ ->
let releaseNotesLines = [
Expand All @@ -65,7 +86,7 @@ let tests =
let (expected:ReleaseNotes.ReleaseNotes) =
{ AssemblyVersion = "1.1.0"; NugetVersion = "1.1.0"; SemVer = SemVer.parse "1.1.0"; Date = Some (System.DateTime(2017,04,12)); Notes = ["- Some change 3"; "- Some change 4"] }

Expect.equal expected releaseNotes "Simple parse failure"
Expect.equal releaseNotes expected "Simple parse failure"

testCase "Test that we can parse complex release notes with header" <| fun _ ->
let releaseNotesLines = [
Expand All @@ -84,7 +105,7 @@ let tests =
let (expected:ReleaseNotes.ReleaseNotes) =
{ AssemblyVersion = "1.1.0"; NugetVersion = "1.1.0"; SemVer = SemVer.parse "1.1.0"; Date = Some (System.DateTime(2017,04,12)); Notes = ["- Some change 3"; "- Some change 4"] }

Expect.equal expected releaseNotes "Simple parse failure"
Expect.equal releaseNotes expected "Simple parse failure"

testCase "Test that we provide proper error #2085" <| fun _ ->
let releaseNotesLines = [
Expand Down

0 comments on commit 9f47e9c

Please sign in to comment.