FAKE - F# Make - A DSL for build tasks and more FAKE
6.0.0

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

Changelog Module

Contains helpers which allow to parse Change log text files. These files have to be in a format as described on keepachangelog

Format
# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.1.0] - 2020-03-17 First release ### Added - This release already has lots of features [0.1.0]: https://github.com/user/MyCoolNewLib.git/releases/tag/v0.1.0

Example


 let changelogFile = "CHANGELOG.md"
     let newVersion = "1.0.0"

     Target.create "AssemblyInfo" (fun _ ->
         let changelog = changeLogFile |> Changelog.load
         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.create "Promote Unreleased to new version" (fun _ ->
         let newChangelog =
             changelogFile
             |> ChangeLog.load
             |> ChangeLog.promoteUnreleased newVersion
             |> ChangeLog.save changelogFile
     )

Types

Type Description

Change

Type of change on log entry

ChangeText

Holds cleared and original text versions of log entry

Changelog

Holds data for a changelog file, which include changelog entries an other metadata

ChangelogEntry

The changelog entry info

Unreleased

Holds data for an unreleased changelog entry type

Functions and values

Function or value Description

Changelog.create description unreleased entries

Full Usage: Changelog.create description unreleased entries

Parameters:
    description : string option - the descriptive text for changelog
    unreleased : Unreleased option - the unreleased list of changelog entries
    entries : ChangelogEntry list - the list of changelog entries

Returns: Changelog

Create a changelog with given data

description : string option

the descriptive text for changelog

unreleased : Unreleased option

the unreleased list of changelog entries

entries : ChangelogEntry list

the list of changelog entries

Returns: Changelog

Changelog.createWithCustomHeader header description unreleased entries

Full Usage: Changelog.createWithCustomHeader header description unreleased entries

Parameters:
    header : string - the custom header value for changelog
    description : string option - the descriptive text for changelog
    unreleased : Unreleased option - the unreleased list of changelog entries
    entries : ChangelogEntry list - the list of changelog entries

Returns: Changelog

Create a changelog with given custom header value

header : string

the custom header value for changelog

description : string option

the descriptive text for changelog

unreleased : Unreleased option

the unreleased list of changelog entries

entries : ChangelogEntry list

the list of changelog entries

Returns: Changelog

Changelog.fromEntries entries

Full Usage: Changelog.fromEntries entries

Parameters:
Returns: Changelog

Create a changelog with given entries and default values for other data including header and description.

entries : ChangelogEntry list

the list of changelog entries

Returns: Changelog

Changelog.load filename

Full Usage: Changelog.load filename

Parameters:
    filename : string - Changelog text file name

Returns: Changelog The loaded changelog (or throws an exception, if the changelog could not be parsed)

Parses a Changelog text file and returns the latest changelog.

filename : string

Changelog text file name

Returns: Changelog

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

Changelog.parse data

Full Usage: Changelog.parse data

Parameters:
    data : seq<string> - change log text

Returns: Changelog

Parses a change log text and returns the change log.

data : seq<string>

change log text

Returns: Changelog

Changelog.parseVersions line

Full Usage: Changelog.parseVersions line

Parameters:
    line : string - The changelog line to parse version from

Returns: Match * Match

Parse versions in changelog file

line : string

The changelog line to parse version from

Returns: Match * Match

Changelog.promoteUnreleased version changelog

Full Usage: Changelog.promoteUnreleased version changelog

Parameters:
    version : string - The version (in NuGet-Version format, e.g. 3.13.4-alpha1.212
    changelog : Changelog - The changelog to promote

Returns: Changelog The promoted changelog

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

version : string

The version (in NuGet-Version format, e.g. 3.13.4-alpha1.212

changelog : Changelog

The changelog to promote

Returns: Changelog

The promoted changelog

Changelog.save filename changelog

Full Usage: Changelog.save filename changelog

Parameters:
    filename : string - Changelog text file name
    changelog : Changelog - the changelog data

Saves a Changelog to a text file.

filename : string

Changelog text file name

changelog : Changelog

the changelog data