No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.nuget
SemanticVersionEnforcer.Core
SemanticVersionEnforcer.Tests
SemanticVersionEnforcer
.gitignore
.travis.yml
LICENCE.txt
README.md
SemanticVersionEnforcer.sln

README.md

SemanticVersionEnforcer

Compares two NuGet packages to determine if the Major and Minor version are semantically correct based on the publicly exposed classes/methods.
Semantic Version Enforcer is available as a package on NuGet Try it out

If you don't wish to compile the code yourself you can obtain it using Nuget:

NuGet.exe install SemanticVersionEnforcer -OutputDirectory SemanticVersionEnforcer  -ExcludeVersion
#Need to copy the nuget.core dll into the executable directory
copy .\SemanticVersionEnforcer\Nuget.Core\lib\net40-Client\NuGet.Core.dll .\SemanticVersionEnforcer\SemanticVersionEnforcer\lib\net45

All you need to execute the tool will be in the .\SemanticVersionEnforcer\SemanticVersionEnforcer\lib\net45 directory, simply copy all the files in that directory to a convenient location. Usage is like so:

SemanticVersionEnforcer.exe newPackage.nupkg [oldPackage.nupkg]

If you pass a single nupkg file, it will check that package against the latest version on nuget

.\SemanticVersionEnforcer\SemanticVersionEnforcer\lib\net45\SemanticVersionEnforcer .\SemanticVersionEnforcer\SemanticVersionEnforcer\SemanticVersionEnforcer.nupkg

Alternatively if you have the two nupkg files locally can pass both of those

.\SemanticVersionEnforcer\SemanticVersionEnforcer\lib\net45\SemanticVersionEnforcer .\SemanticVersionEnforcer\SemanticVersionEnforcer\SemanticVersionEnforcer.nupkg .\SemanticVersionEnforcer\SemanticVersionEnforcer\SemanticVersionEnforcer.nupkg

Use it Programmatically

If you wish to use the Enforcer programmatically you can interact with it programmatically via the ISemanticVersionChecker Interface.
Most usecases for this are via some form of test which is executed before a package is published to ensure it conforms at some basic level with semantic versioning.
An example of how this can be achieved can be seen in the PackagePublicationVersionTests test.

Build Status