EasyBuild.PackageReleaseNotes.Tasks 2.0.0

dotnet add package EasyBuild.PackageReleaseNotes.Tasks --version 2.0.0                
NuGet\Install-Package EasyBuild.PackageReleaseNotes.Tasks -Version 2.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EasyBuild.PackageReleaseNotes.Tasks" Version="2.0.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasyBuild.PackageReleaseNotes.Tasks --version 2.0.0                
#r "nuget: EasyBuild.PackageReleaseNotes.Tasks, 2.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install EasyBuild.PackageReleaseNotes.Tasks as a Cake Addin
#addin nuget:?package=EasyBuild.PackageReleaseNotes.Tasks&version=2.0.0

// Install EasyBuild.PackageReleaseNotes.Tasks as a Cake Tool
#tool nuget:?package=EasyBuild.PackageReleaseNotes.Tasks&version=2.0.0                

EasyBuild.PackageReleaseNotes.Tasks

NuGet

Sponsors badge link

This project provides MSBuild tasks to automate setting the following properties based on the content of a CHANGELOG file:

  • Version - The version of the latest release
  • PackageVersion - The version of the latest release
  • PackageReleaseNotes - The body of the latest release

Usage

  1. Install EasyBuild.PackageReleaseNotes.Tasks from NuGet

    dotnet add package EasyBuild.PackageReleaseNotes.Tasks
    
  2. If your CHANGELOG file is not named CHANGELOG.md, and beside your project file, you can set the ChangelogFile property in your project file.

    <PropertyGroup>
        <ChangelogFile>path/to/CHANGELOG.md</ChangelogFile>
    </PropertyGroup>
    

    💡 You can use the MSBuild property $(MSBuildThisFileDirectory) to get the directory of the project file.

    <PropertyGroup>
    
        <ChangelogFile>$(MSBuildThisFileDirectory)path/to/CHANGELOG.md</ChangelogFile>
    </PropertyGroup>
    

What is the latest release?

The first version at the top of the file which is not Unreleased is considered the latest release.

## [Unreleased]

## [1.0.0] - 2021-01-01

## [0.1.0] - 2020-01-01

In this example, 1.0.0 is the latest release.

Supported format

The tool is on purpose flexible on how a version is detected. It allows it to work with various formats like KeepAChangeLog, conventional commits based changelog.

It supports the following formats:

  • ## 1.0.0 - 2021-01-01
  • ## [1.0.0] - 2021-01-01
  • ## v1.0.0 - 2021-01-01
  • ## [v1.0.0] - 2021-01-01
  • ## 1.0.0
  • ## [1.0.0]
  • ## v1.0.0
  • ## [v1.0.0]

<details> <summary>Regex used to match the version</summary>

^                    # Start of the string
##                   # Match literal "##"
\s                   # Match a space (whitespace character)
\[?                  # Optionally match an opening bracket '['
v?                   # Optionally match a literal 'v' (for version)
(?<version>          # Start a named capture group for "version"
  [\w\d.-]+          # Match one or more word characters (letters, digits), dots, or hyphens
  \.                 # Match a literal dot (.)
  [\w\d.-]+          # Match one or more word characters (letters, digits), dots, or hyphens again
  [a-zA-Z0-9]        # Match a single alphanumeric character (ensures no trailing dot/hyphen)
)                    # End the "version" capture group
\]?                  # Optionally match a closing bracket ']'
\s-\s                # Match a literal space, hyphen, and space " - "
(?<date>             # Start a named capture group for "date"
  \d{4}              # Match exactly 4 digits (year)
  -                  # Match a literal hyphen "-"
  \d{2}              # Match exactly 2 digits (month)
  -                  # Match a literal hyphen "-"
  \d{2}              # Match exactly 2 digits (day)
)?                   # The "date" group is optional (match 0 or 1 times)
$                    # End of the string

</details>

MSBuild properties

The task exposes the following property:

  • CurrentRelease.Version - The version of the latest release (without the leading v)
  • CurrentRelease.Date - The date of the latest release
  • CurrentRelease.Body - The body of the latest release

[!NOTE] CurrentRelease name is used in the sense that this is the release that is currently being processed.

Aknowledgements

This project has been inspired by Ionide.KeepAChangeLog. If you are using KeepAChangeLog format, you need a deeper integration with your CHANGELOG file, like accessing the different sections of a release, you should take a look at this project.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETFramework 4.7.2

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.0 123 11/15/2024
1.2.0 192 9/14/2024
1.1.0 116 9/14/2024
1.0.0 115 9/13/2024

## 2.0.0

### 🚀 Features

- Skip `Unreleased` version to support KeepAChangelog format ([fd1fed1](https://github.com/easybuild-org/EasyBuild.CommitLinter/commit/fd1fed1b7da8b7a80b2fb6966ea27493f5d5f3bf))
- If no version found in the changelog file, default to 0.0.0 ([d9a0f8b](https://github.com/easybuild-org/EasyBuild.CommitLinter/commit/d9a0f8be7c19485e3e50c87a8462c3152d848ae2))