diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-15 16:32:13 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-15 21:14:31 +0200 |
commit | c7c3fd96e97ae2ec3914d36cb920a6f02c9a3414 (patch) | |
tree | 99995a41e386174a22ba83009a4bd49038e681fd /build2/utility | |
parent | 9dff5c62fe2b0814ab7fc943c3f527434d637b2f (diff) |
Support X.Y.Z- version notation
Diffstat (limited to 'build2/utility')
-rw-r--r-- | build2/utility | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/build2/utility b/build2/utility index 5240e4d..9245d86 100644 --- a/build2/utility +++ b/build2/utility @@ -24,8 +24,32 @@ namespace build2 extern const dir_path empty_dir_path; // Parse version string in the X.Y.Z[-{a|b}N] to a version integer in the - // AABBCCDD form as describe in <build2/version>. Throw invalid_argument - // if the passed string is not a valid version. + // AABBCCDD form, where: + // + // AA - major version number + // BB - minor version number + // CC - bugfix version number + // DD - alpha / beta (DD + 50) version number + // + // When DD is not 00, 1 is subtracted from AABBCC. For example: + // + // Version AABBCCDD + // 2.0.0 02000000 + // 2.1.0 02010000 + // 2.1.1 02010100 + // 2.2.0-a1 02019901 + // 3.0.0-b2 02999952 + // + // For a version in the 1.2.3- form, it returns (AABBCC-1)01, which is the + // lowest possible version in the 1.2.3 release set. For example: + // + // Version AABBCCDD + // 2.2.0- 02019901 + // 1.2.3- 01020201 + // + // In fact versions 1.2.3- and 1.2.3-a1 are equivalent. + // + // Throw invalid_argument if the passed string is not a valid version. // unsigned int to_version (const string&); |