Skip to content

Releases: hinteadan/H.Versioning

Programmatically specify version file path

19 Sep 19:54
Compare
Choose a tag to compare

Programmatically configure the path to the version file. Use it for IIS or Azure hosting.

FileVersionProviderSettings.Default.VersionFilePath = Server.MapPath("~/version.txt");

Make the Library Unibody

05 Mar 10:48
Compare
Choose a tag to compare

From now on the library outputs as a single DLL (+ the CLI executable).

So when you get the NuGet you'll no longer have to deal with the gitlib DLLs. They are embedded in H.Versioning's DLL.

This release removes a leftover build XML from the NuGet output.

Make the Library Unibody

05 Mar 10:36
Compare
Choose a tag to compare

From now on the library outputs as a single DLL (+ the CLI executable).

So when you get the NuGet you'll no longer have to deal with the gitlib DLLs. They are embedded in H.Versioning's DLL.

Read version file path from application config file if available

02 Mar 11:05
Compare
Choose a tag to compare

If you have a version.txt file in the app's root folder, containing the result of:

H.Versioning.Version.Self.GetCurrent().ToString()

then the library will parse the version from there.

Alternatively, you can specify the full path of the file in a config entry with the key:

H.Versioning.VersionFile.

Ignore tags according to specific predicates

12 Feb 15:19
Compare
Choose a tag to compare

With version 1.2.0 you can ignore specific annotated tags by providing a predicate.

This is for scenarios where you create tags for quick reference but they are not actual Release tags.

Example:

H.Versioning.Version.IgnoreTag(t => t.StartsWith("x")); //Ignore tags that start with "x"

Lambda style definition for custom version number parsers (fixed a missing merge from previous release).

11 Feb 22:38
Compare
Choose a tag to compare

Now you can easily specify a custom version number parser by simply providing the parsing function,

Easiest way is via a lambda.

Example: Version.UseParser(v => new VersionNumber(int.Parse(v.Substring(0, 1)), int.Parse(v.Substring(1))));.

Lambda style definition for custom version number parsers

11 Feb 20:02
Compare
Choose a tag to compare

Now you can easily specify a custom version number parser by simply providing the parsing function,

Easiest way is via a lambda.

Example: Version.UseParser(v => new VersionNumber(int.Parse(v.Substring(0, 1)), int.Parse(v.Substring(1))));.

Custom version number parsers

11 Feb 09:38
Compare
Choose a tag to compare

Starting with version v1.1.0 I added the ability to define custom version number parsers. This is useful if you have a custom versioning format.

To use this feature do the following:

  1. Write your own custom class that implements the H.Versioning.VersionNumberParsers.ICanParseVersionNumber interface.
  2. Tell H.Versioning to use it via: Version.UseParser(MyCustomVersionNumberParser);

The parsers are internally stored in a stack, therefore their priority is Last In, First Out.

The library will use the first parsing result that succeeds. If all of the registered parsers fail, it will throw an AggregateException containing the exceptions thrown by each parser.