Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Remove tilde character. It does not work with Ruby gems.

...

When we have a project that we need to fork, where we want to make changes on the fork, but have our version numbers follow along with the origin's version numbers, we will use this convention:

Code Block
X.Y.Z~<project>xZ<project>x.y.z

Example, where the "platform" project is forked off into a "platform-cqa" repository to maintain an alternate feature set that we don't want to deploy with the main application:

Code Block
3.1.0~cqa10cqa1.0.0

In that case, if we make more changes based on that release, we might increment our version to 3.1.0~cqa10cqa1.1.0. If there's a new release of "platform" as 3.1.1, then our next version would be 3.1.1~cqa11cqa1.0.0, and so on.

The tilde character should not be processed by SemVer-aware tools as a metadata separator ("+") or a pre-release separator("-"). The part after the tilde should not be thrown away as would happen with build metadata, and should sortĀ higher than the base version rather than lower.

More Sort-order examples:

  • 3.1.0-a1 < 3.1.0
  • but 3.1.0 < 3.1.0~cqa1.0.0
  • and 3.1.0~cqa10cqa1.0.0 < 3.1.0~cqa10cqa1.0.1

See theĀ SemVer sort order section.

...