Validate if AssemblyInformationalVersion is a valid semver before trying to use it
There are a number of ways that OctoPack figures out which version number to use, from top to bottom:
- Whatever you pass in using /p:OctoPackPackageVersion=1.0.3
- AssemblyInformationalVersion
- AssemblyVersion
However, I like to use AssemblyInformationalVersion to store meta-data that is not exactly semver (branch name, commit hash, etc.), and because of an error occurs when I trying to pack:
[CreateOctoPackPackage] OctoPack: pack: invalid arguments.
[CreateOctoPackPackage] OctoPack: usage: NuGet pack <nuspec | project>[options]
and it can't contain a valid SemVer, then you'll need to pass it explicitly as an MSBuild parameter.

-
C. Augusto Proiete commented
I've opened PR #72 that validates if `ProductVersion` is a valid semantic version before using it (and therefore, will use `AssemblyVersion` if `ProductVersion` is not a valid semver)
Do not use InformationalVersion/ProductVersion if not valid SemVer
https://github.com/OctopusDeploy/OctoPack/pull/72