Note: This API documentation is for FAKE version 4. The migration API documentation can be found here. The API documentation for the new fake 5 modules can be found here

ChangeLogHelper

Contains helpers which allow to parse Change log text files. These files have to be in a format as described on http://keepachangelog.com/en/0.3.0/

Sample

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
let changeLogFile = "CHANGELOG.md"
let newVersion = "1.0.0"

Target "AssemblyInfo" (fun _ ->
    let changeLog = changeLogFile |> ChangeLogHelper.LoadChangeLog
    CreateFSharpAssemblyInfo "src/Common/AssemblyInfo.fs"
      [ Attribute.Title project
        Attribute.Product project
        Attribute.Description summary
        Attribute.Version changeLog.LatestEntry.AssemblyVersion
        Attribute.FileVersion changeLog.LatestEntry.AssemblyVersion]
)

Target "Promote Unreleased to new version" (fun _ ->
    let newChangeLog = 
        changeLogFile 
        |> ChangeLogHelper.LoadChangeLog
        |> ChangeLogHelper.PromoteUnreleased newVersion
        |> ChangeLogHelper.SavceChangeLog changeLogFile
)
val changeLogFile : string
val newVersion : string

Nested types and modules

TypeDescription
Change
ChangeLog
ChangeLogEntry
Unreleased

Functions and values

Function or valueDescription
LoadChangeLog(fileName)
Signature: fileName:string -> ChangeLog

Parses a Change log text file and returns the lastest change log.

Parameters

  • fileName - ChangeLog text file name

Returns

The loaded change log (or throws an exception, if the change log could not be parsed)

parseChangeLog(data)
Signature: data:seq<string> -> ChangeLog

Parses a change log text and returns the change log.

Parameters

  • data - change log text
parseVersions
Signature: string -> Match * Match
PromoteUnreleased version changeLog
Signature: version:string -> changeLog:ChangeLog -> ChangeLog

Promotes the Unreleased section of a changelog to a new change log entry with the given version

Parameters

  • version - The version (in NuGet-Version format, e.g. 3.13.4-alpha1.212
  • changeLog - The change log to promote

Returns

The promoted change log

SaveChangeLog fileName changeLog
Signature: fileName:string -> changeLog:ChangeLog -> unit

Saves a Change log to a text file.

Parameters

  • fileName - ChangeLog text file name
  • changeLog - the change log data