Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This repo includes support for versioning numbers. This support includes:
build numbering. It is NOT a CSemVer but IS a SemVer.

## Status
![NuGet](https://img.shields.io/nuget/dt/Ubiquity.NET.Versioning.svg)
[![NuGet Version](https://img.shields.io/nuget/v/Ubiquity.NET.Versioning)](https://www.nuget.org/packages/Ubiquity.NET.Versioning)![NuGet](https://img.shields.io/nuget/dt/Ubiquity.NET.Versioning.svg)
![PR/CI Work Flow Status](https://img.shields.io/github/actions/workflow/status/UbiquityDotNET/Ubiquity.NET.Versioning/pr-build.yml?label=PR%2FCI%20Build%20Status)
![Release Work Flow Status](https://img.shields.io/github/actions/workflow/status/UbiquityDotNET/Ubiquity.NET.Versioning/release-build.yml?label=Release%20Build%20Status)

Expand Down Expand Up @@ -62,4 +62,4 @@ Documentation on building and general maintenance of this repo are provided in t

----
<sup><a id="footnote_1">1</a></sup>See: [This issue](https://github.com/CK-Build/csemver.org/issues/2) which was reported upon
testing this library and found inconsistencies.
testing this library and found ambiguities.
5 changes: 4 additions & 1 deletion docfx/versioning-lib/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ The Ubiquity.NET.Versioning library provides types to support use of versioning
1) [Semantic Versioning](https://semver.org)
2) [Constrained Semantic Versioning](https://csemver.org)
- Including Continuous Integration (CI) via CSemVer-CI
- Including FileVersion QUAD representation
- Including OrderedVersion integral representation.

It is viable as a standalone package to allow validation of or comparisons to versions
reported at runtime. (Especially from native interop that does not support package
dependencies or versioning at runtime.)
dependencies or versioning at runtime.) The [Ubiquity.NET.Versioning.Build.Tasks](https://www.nuget.org/packages/Ubiquity.NET.Versioning.Build.Tasks)
is a companion project that implements automated build support for CSemVer.

## Example
``` C#
Expand Down
2 changes: 2 additions & 0 deletions src/Ubiquity.NET.Versioning.UT/ParsedBuildVersionXmlTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// -----------------------------------------------------------------------

using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Xml.Linq;

Expand Down Expand Up @@ -83,6 +84,7 @@ private static readonly XDocument InvalidAttributeXml
)
);

[SuppressMessage( "StyleCop.CSharp.NamingRules", "SA1310:Field names should not contain underscore", Justification = "Underscores substitute for otherwise invalid delimiter" )]
private static readonly XDocument Xml_5_0_4
= new( new XElement("BuildVersionData",
new XAttribute("BuildMajor", "5"),
Expand Down
7 changes: 4 additions & 3 deletions src/Ubiquity.NET.Versioning.UT/ValidationWithTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void ValidateRepoAssemblyVersion( )
// NOTE: Concept of a CI build used here (and in CSemVer[-CI]) is anything that is NOT
// a release build. It does not distinguish between local, PR, or "nightly" etc...
// That information is lost in creation of the FileVersionQuad form anyway and
// only a single bit represents a CSemVer or CSemVer-CI.
// only a single bit represents a CI build.
BuildKind buildKind = GetBuildKind();
bool isCIBuild = buildKind != BuildKind.ReleaseBuild;

Expand Down Expand Up @@ -88,8 +88,9 @@ public void ValidateRepoAssemblyVersion( )
// This is where the Patch+1 behavior is validated against the task
// Both this library and the generated version for this library (from the task)
// should agree on the build and base build. Bug: https://github.com/UbiquityDotNET/CSemVer.GitBuild/issues/64
// on the task deals with the incorrect assumption that baseBuild == build and
// generally ignores the Patch+1 requirement.
// on the task dealt with the previously incorrect assumption that baseBuild == build and
// generally ignored the Patch+1 requirement. That has since been fixed but worth keeping in mind
// as this point has caused a great deal of confusion.
Assert.AreEqual( expectedVersion.Major, actualCI.Major );
Assert.AreEqual( expectedVersion.Minor, actualCI.Minor );
Assert.AreEqual( expectedVersion.Patch, actualCI.Patch );
Expand Down
Loading