1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! **Which build reference a binary is stamped with** — the one rule both
//! build scripts that stamp `GUNNAR_BUILD_REF` (gunnar-common's and
//! gunnar-cli's) follow, kept in one file so the banner and the build-thing
//! receipt can never name different commits. Pure: the build scripts read the
//! environment and run `git describe`; this only chooses.
/// The variables a builder sets, in the order they win.
pub const ENV_REFS: = ;
/// Choose the stamp: the builder's variables first (`env`, in [`ENV_REFS`]
/// order), then the checkout's own `git describe`, else `None`.
///
/// The builder's value is PREFERRED over git, not only a fallback for it. A
/// Build Thing container build of a tree copied without its `.git` has nothing
/// for `describe` to read — and a copied tree sitting inside some other
/// checkout would be described as THAT checkout. The one who handed the tree
/// over knows which commit it is (the Build Thing exports `NORDISK_BUILD_REF`
/// from the host's `git describe`, or the caller's own value).
/// The builder's variables, read in [`ENV_REFS`] order, each announced to cargo
/// so a changed value re-stamps. For a `build.rs` only.
// the test target includes this file and reads no environment