Skip to content

Support for full Semantic versioning #592

@slantview

Description

@slantview

While gems are encouraged to use semver, it is not fully supported.

Invalid gemspec in [mygem.gemspec]: Malformed version number string 0.1.0+build.45
ERROR:  Error loading gemspec. Aborting.

According to semver.org sections 9-11, "0.1.0+build.45" is a correctly formatted semantic version, but it is not allowed currently as are "0.1.0+alpha.2" or "0.1.0+beta.2" which are all correct according to semver.org.

If you would like to see a project that is correctly using the semver.org guide, check out https://github.com/RiotGames/thor-scmversion

Here is the Regex:

VERSION_FORMAT = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)-?(?<prerelease>#{Prerelease::FORMAT})?(\+build\.)?(?<build>\d+)?$/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions