aboutsummaryrefslogtreecommitdiff
path: root/build2/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-07-28 09:09:46 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-07-28 09:09:46 +0200
commite92a1aab0e1c7c9ba8e6ab9a7049207468ca53fc (patch)
tree23fb4be5482b267047731ecbeaa0867dbb4b24b1 /build2/context.cxx
parentacdcc228c252e2a0a90a8586c5b5c6984332635b (diff)
Add build.version.stage boolean variable
It can be used to detection (for example, in tests) whether this is a staged toolchain.
Diffstat (limited to 'build2/context.cxx')
-rw-r--r--build2/context.cxx14
1 files changed, 14 insertions, 0 deletions
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