Read version number from a binary.
C# PowerShell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Cake.VersionReader
tools
.gitattributes
.gitignore
LICENSE
build.cake
build.ps1
icon.png
readme.md

readme.md

Cake.VersionReader

Build status NuGet

An addin for Cake that allows for the easy retrieval of version numbers from an assembly. Also support creating CI version numbers that fit with SemVer based on this article.

You can easily reference Cake.VersionReader directly in your build script using Cake's Addin syntax:

#addin nuget:?package=Cake.VersionReader

Methods

The following methods are provided:

  • GetVersionNumber(this ICakeContext context, FilePath file)

Get the version number for the spesified file in the SemVer format "0.0.0"

  • GetFullVersionNumber(this ICakeContext context, FilePath file)

Get the version number for the spesified file in 4-digit format "0.0.0.0"

  • GetVersionNumberWithContinuesIntegrationNumberAppended(this ICakeContext context, FilePath file, int buildNumber)

Get the CI version number in the format "0.0.0-CI00000"

  • GetFullVersionNumberWithContinuesIntegrationNumberAppended(this ICakeContext context, FilePath file, int buildNumber)

Get the CI version number in the format "0.0.0.0-CI00000"

Icon

Cyclops by Mike Hince from the Noun Project, remixed with the Cake icon.