From e92a1aab0e1c7c9ba8e6ab9a7049207468ca53fc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 28 Jul 2018 09:09:46 +0200 Subject: Add build.version.stage boolean variable It can be used to detection (for example, in tests) whether this is a staged toolchain. --- build2/context.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/build2/context.cxx b/build2/context.cxx index 069bc94..225ff1c 100644 --- a/build2/context.cxx +++ b/build2/context.cxx @@ -470,6 +470,20 @@ namespace build2 set ("build.version.snapshot_sn", v.snapshot_sn); // uint64 set ("build.version.snapshot_id", v.snapshot_id); // string set ("build.version.snapshot_string", v.string_snapshot ()); + + // Allow detection (for example, in tests) whether this is a staged + // toolchain. + // + // Note that it is either staged or public, without queued, since we do + // not re-package things during the queued-to-public transition. + // + // Currently the value is adjusted manually during release but in the + // future the idea is to use version metadata (e.g., 1.2.3-a.1+0.stage). + // This way it will all be managed in a central place (manifest), we + // can teach the version module to extract it, and we can also set it + // for the other packages in the toolchain. + // + set ("build.version.stage", true); } // Enter the host information. Rather than jumping through hoops like -- cgit v1.1