diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-03-20 14:01:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-03-20 14:01:38 +0200 |
commit | 10ec1ac16b5ec2577b94e8311e48ee3c7db9fb78 (patch) | |
tree | c23d7edabe624448b20b835af74bcea81cdf39bd /build2/version/module.hxx | |
parent | 4cc966d1468f6ce59600517e44d4817c0905210f (diff) |
Come up with better version for uncommitted snapshots
Instead of leaving it as .z we now take the date of the previous commit and
increment it by a second. The main benefit of doing it this way is that once
committed, the new version does not "jump back" behind .z.
Diffstat (limited to 'build2/version/module.hxx')
-rw-r--r-- | build2/version/module.hxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/build2/version/module.hxx b/build2/version/module.hxx index 190d8d7..a5a667a 100644 --- a/build2/version/module.hxx +++ b/build2/version/module.hxx @@ -25,13 +25,19 @@ namespace build2 static const string name; butl::standard_version version; + bool committed; // Whether this is a committed snapshot. + dependency_constraints dependencies; const variable* in_symbol = nullptr; // in.symbol const variable* in_substitution = nullptr; // in.substitution - module (butl::standard_version v, dependency_constraints d) - : version (move (v)), dependencies (move (d)) {} + module (butl::standard_version v, + bool c, + dependency_constraints d) + : version (move (v)), + committed (c), + dependencies (move (d)) {} }; } } |