Releases: hinteadan/H.Versioning
Programmatically specify version file path
Make the Library Unibody
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
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
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
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).
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
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
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:
- Write your own custom class that implements the
H.Versioning.VersionNumberParsers.ICanParseVersionNumber
interface. - 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.