1#[doc=r#"
8The name of the Git branch that this project was built from.
9This constant will be empty if the branch cannot be determined."#]
10#[allow(dead_code)]
11#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
12pub const BRANCH :&str = r#""#;
13
14#[doc=r#"
15Operating system and architecture on which the project was build.
16The format of this variable is always `os-arch`,
17where `os` is the operating system name as returned by [`std::env::consts::OS`],
18and `arch` is the computer architecture as returned by [`std::env::consts::ARCH`]."#]
19#[allow(dead_code)]
20#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
21pub const BUILD_OS :&str = r#"linux-x86_64"#;
22
23#[doc=r#"
24The debug configuration with which the project was built.
25Note that this is not the Rust channel, but either `debug` or `release`, depending on whether debug assertions were enabled in the build or not. "#]
26#[allow(dead_code)]
27#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
28pub const BUILD_RUST_CHANNEL :&str = r#"debug"#;
29
30#[doc=r#"
31The [target](https://doc.rust-lang.org/rustc/targets/index.html) for this build.
32This is possibly distinct from the host target during build, in which case this project build was created via cross-compilation."#]
33#[allow(dead_code)]
34#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
35pub const BUILD_TARGET :&str = r#"x86_64-unknown-linux-gnu"#;
36
37#[doc=r#"
38The architecture of the target for this build. This is the "architecture" part of the [`BUILD_TARGET`] constant."#]
39#[allow(dead_code)]
40#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
41pub const BUILD_TARGET_ARCH :&str = r#"x86_64"#;
42
43#[doc=r#"
44The project build time, formatted in modified ISO 8601 format (`YYYY-MM-DD HH-MM ±hh-mm` where hh-mm is the offset from UTC)."#]
45#[allow(dead_code)]
46#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
47pub const BUILD_TIME :&str = r#"2025-11-03 03:22:02 +00:00"#;
48
49#[doc=r#"
50The project build time, formatted according to [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) (e.g. HTTP Headers)."#]
51#[allow(dead_code)]
52#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
53pub const BUILD_TIME_2822 :&str = r#"Mon, 03 Nov 2025 03:22:02 +0000"#;
54
55#[doc=r#"
56The project build time, formatted according to [RFC 3339 and ISO 8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)."#]
57#[allow(dead_code)]
58#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
59pub const BUILD_TIME_3339 :&str = r#"2025-11-03T03:22:02Z"#;
60
61#[doc=r#"
62The directory of the Cargo.toml manifest file of the project during build.
63Note that this variable will contain a full local file system path, and will therefore contain sensitive information and not be reproducible."#]
64#[allow(dead_code)]
65#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
66pub const CARGO_MANIFEST_DIR :&str = r#"/opt/rustwide/workdir"#;
67
68#[doc=r#"
69The dependency tree of the project, as output by `cargo tree`.
70Note that this variable may contain local file system paths for path dependencies, and may therefore contain sensitive information and not be reproducible."#]
71#[allow(dead_code)]
72#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
73pub const CARGO_TREE :&str = r#"
74├── clap v4.5.51
75│ ├── clap_builder v4.5.51
76│ │ ├── anstream v0.6.21
77│ │ │ ├── anstyle v1.0.13
78│ │ │ ├── anstyle-parse v0.2.7
79│ │ │ │ └── utf8parse v0.2.2
80│ │ │ ├── anstyle-query v1.1.4
81│ │ │ ├── colorchoice v1.0.4
82│ │ │ ├── is_terminal_polyfill v1.70.2
83│ │ │ └── utf8parse v0.2.2
84│ │ ├── anstyle v1.0.13
85│ │ ├── clap_lex v0.7.6
86│ │ └── strsim v0.11.1
87│ └── clap_derive v4.5.49 (proc-macro)
88│ ├── heck v0.5.0
89│ ├── proc-macro2 v1.0.103
90│ │ └── unicode-ident v1.0.22
91│ ├── quote v1.0.41
92│ │ └── proc-macro2 v1.0.103 (*)
93│ └── syn v2.0.108
94│ ├── proc-macro2 v1.0.103 (*)
95│ ├── quote v1.0.41 (*)
96│ └── unicode-ident v1.0.22
97├── ron v0.8.1
98│ ├── base64 v0.21.7
99│ ├── bitflags v2.10.0
100│ │ └── serde_core v1.0.228
101│ ├── serde v1.0.228
102│ │ ├── serde_core v1.0.228
103│ │ └── serde_derive v1.0.228 (proc-macro)
104│ │ ├── proc-macro2 v1.0.103 (*)
105│ │ ├── quote v1.0.41 (*)
106│ │ └── syn v2.0.108 (*)
107│ └── serde_derive v1.0.228 (proc-macro) (*)
108├── serde v1.0.228 (*)
109├── shadow-rs v1.4.0
110│ ├── const_format v0.2.35
111│ │ └── const_format_proc_macros v0.2.34 (proc-macro)
112│ │ ├── proc-macro2 v1.0.103 (*)
113│ │ ├── quote v1.0.41 (*)
114│ │ └── unicode-xid v0.2.6
115│ └── is_debug v1.1.0
116├── shlex v1.3.0
117├── thiserror v2.0.17
118│ └── thiserror-impl v2.0.17 (proc-macro)
119│ ├── proc-macro2 v1.0.103 (*)
120│ ├── quote v1.0.41 (*)
121│ └── syn v2.0.108 (*)
122└── tmux_interface v0.3.2
123[build-dependencies]
124└── shadow-rs v1.4.0
125 ├── const_format v0.2.35 (*)
126 ├── git2 v0.20.2
127 │ ├── bitflags v2.10.0
128 │ ├── libc v0.2.177
129 │ ├── libgit2-sys v0.18.2+1.9.1
130 │ │ ├── libc v0.2.177
131 │ │ └── libz-sys v1.1.22
132 │ │ └── libc v0.2.177
133 │ │ [build-dependencies]
134 │ │ ├── cc v1.2.44
135 │ │ │ ├── find-msvc-tools v0.1.4
136 │ │ │ ├── jobserver v0.1.34
137 │ │ │ │ └── libc v0.2.177
138 │ │ │ ├── libc v0.2.177
139 │ │ │ └── shlex v1.3.0
140 │ │ ├── pkg-config v0.3.32
141 │ │ └── vcpkg v0.2.15
142 │ │ [build-dependencies]
143 │ │ ├── cc v1.2.44 (*)
144 │ │ └── pkg-config v0.3.32
145 │ ├── log v0.4.28
146 │ └── url v2.5.7
147 │ ├── form_urlencoded v1.2.2
148 │ │ └── percent-encoding v2.3.2
149 │ ├── idna v1.1.0
150 │ │ ├── idna_adapter v1.2.1
151 │ │ │ ├── icu_normalizer v2.1.1
152 │ │ │ │ ├── icu_collections v2.1.1
153 │ │ │ │ │ ├── displaydoc v0.2.5 (proc-macro)
154 │ │ │ │ │ │ ├── proc-macro2 v1.0.103 (*)
155 │ │ │ │ │ │ ├── quote v1.0.41 (*)
156 │ │ │ │ │ │ └── syn v2.0.108 (*)
157 │ │ │ │ │ ├── potential_utf v0.1.4
158 │ │ │ │ │ │ └── zerovec v0.11.5
159 │ │ │ │ │ │ ├── yoke v0.8.1
160 │ │ │ │ │ │ │ ├── stable_deref_trait v1.2.1
161 │ │ │ │ │ │ │ ├── yoke-derive v0.8.1 (proc-macro)
162 │ │ │ │ │ │ │ │ ├── proc-macro2 v1.0.103 (*)
163 │ │ │ │ │ │ │ │ ├── quote v1.0.41 (*)
164 │ │ │ │ │ │ │ │ ├── syn v2.0.108 (*)
165 │ │ │ │ │ │ │ │ └── synstructure v0.13.2
166 │ │ │ │ │ │ │ │ ├── proc-macro2 v1.0.103 (*)
167 │ │ │ │ │ │ │ │ ├── quote v1.0.41 (*)
168 │ │ │ │ │ │ │ │ └── syn v2.0.108 (*)
169 │ │ │ │ │ │ │ └── zerofrom v0.1.6
170 │ │ │ │ │ │ │ └── zerofrom-derive v0.1.6 (proc-macro)
171 │ │ │ │ │ │ │ ├── proc-macro2 v1.0.103 (*)
172 │ │ │ │ │ │ │ ├── quote v1.0.41 (*)
173 │ │ │ │ │ │ │ ├── syn v2.0.108 (*)
174 │ │ │ │ │ │ │ └── synstructure v0.13.2 (*)
175 │ │ │ │ │ │ ├── zerofrom v0.1.6 (*)
176 │ │ │ │ │ │ └── zerovec-derive v0.11.2 (proc-macro)
177 │ │ │ │ │ │ ├── proc-macro2 v1.0.103 (*)
178 │ │ │ │ │ │ ├── quote v1.0.41 (*)
179 │ │ │ │ │ │ └── syn v2.0.108 (*)
180 │ │ │ │ │ ├── yoke v0.8.1 (*)
181 │ │ │ │ │ ├── zerofrom v0.1.6 (*)
182 │ │ │ │ │ └── zerovec v0.11.5 (*)
183 │ │ │ │ ├── icu_normalizer_data v2.1.1
184 │ │ │ │ ├── icu_provider v2.1.1
185 │ │ │ │ │ ├── displaydoc v0.2.5 (proc-macro) (*)
186 │ │ │ │ │ ├── icu_locale_core v2.1.1
187 │ │ │ │ │ │ ├── displaydoc v0.2.5 (proc-macro) (*)
188 │ │ │ │ │ │ ├── litemap v0.8.1
189 │ │ │ │ │ │ ├── tinystr v0.8.2
190 │ │ │ │ │ │ │ ├── displaydoc v0.2.5 (proc-macro) (*)
191 │ │ │ │ │ │ │ └── zerovec v0.11.5 (*)
192 │ │ │ │ │ │ ├── writeable v0.6.2
193 │ │ │ │ │ │ └── zerovec v0.11.5 (*)
194 │ │ │ │ │ ├── writeable v0.6.2
195 │ │ │ │ │ ├── yoke v0.8.1 (*)
196 │ │ │ │ │ ├── zerofrom v0.1.6 (*)
197 │ │ │ │ │ ├── zerotrie v0.2.3
198 │ │ │ │ │ │ ├── displaydoc v0.2.5 (proc-macro) (*)
199 │ │ │ │ │ │ ├── yoke v0.8.1 (*)
200 │ │ │ │ │ │ └── zerofrom v0.1.6 (*)
201 │ │ │ │ │ └── zerovec v0.11.5 (*)
202 │ │ │ │ ├── smallvec v1.15.1
203 │ │ │ │ └── zerovec v0.11.5 (*)
204 │ │ │ └── icu_properties v2.1.1
205 │ │ │ ├── icu_collections v2.1.1 (*)
206 │ │ │ ├── icu_locale_core v2.1.1 (*)
207 │ │ │ ├── icu_properties_data v2.1.1
208 │ │ │ ├── icu_provider v2.1.1 (*)
209 │ │ │ ├── zerotrie v0.2.3 (*)
210 │ │ │ └── zerovec v0.11.5 (*)
211 │ │ ├── smallvec v1.15.1
212 │ │ └── utf8_iter v1.0.4
213 │ ├── percent-encoding v2.3.2
214 │ └── serde v1.0.228
215 │ ├── serde_core v1.0.228
216 │ └── serde_derive v1.0.228 (proc-macro) (*)
217 ├── is_debug v1.1.0
218 ├── time v0.3.44
219 │ ├── deranged v0.5.5
220 │ │ └── powerfmt v0.2.0
221 │ ├── itoa v1.0.15
222 │ ├── libc v0.2.177
223 │ ├── num-conv v0.1.0
224 │ ├── num_threads v0.1.7
225 │ ├── powerfmt v0.2.0
226 │ └── time-core v0.1.6
227 └── tzdb v0.7.2
228 ├── iana-time-zone v0.1.64
229 ├── tz-rs v0.7.1
230 └── tzdb_data v0.2.2
231 └── tz-rs v0.7.1
232"#;
233
234#[doc=r#"
235The cargo version which which the project was built, as output by `cargo --version`."#]
236#[allow(dead_code)]
237#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
238pub const CARGO_VERSION :&str = r#"cargo 1.93.0-nightly (636800288 2025-10-31)"#;
239
240#[doc=r#"
241The number of commits since the last Git tag on the branch that this project was built from.
242This value indicates how many commits have been made after the last tag and before the current commit.
243
244If there are no additional commits after the last tag (i.e., the current commit is exactly at a tag),
245this value will be `0`.
246
247This constant will be empty or `0` if the last tag cannot be determined or if there are no commits after it.
248"#]
249#[allow(dead_code)]
250#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
251pub const COMMITS_SINCE_TAG :usize = 0;
252
253#[doc=r#"
254The author of the Git commit that this project was built from.
255
256This constant will be empty if the last commit cannot be determined."#]
257#[allow(dead_code)]
258#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
259pub const COMMIT_AUTHOR :&str = r#""#;
260
261#[doc=r#"The time of the Git commit that this project was built from.
262The time is formatted in modified ISO 8601 format (`YYYY-MM-DD HH-MM ±hh-mm` where hh-mm is the offset from UTC).
263
264This constant will be empty if the last commit cannot be determined."#]
265#[allow(dead_code)]
266#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
267pub const COMMIT_DATE :&str = r#""#;
268
269#[doc=r#"
270The name of the Git branch that this project was built from.
271The time is formatted according to [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) (e.g. HTTP Headers).
272
273This constant will be empty if the last commit cannot be determined."#]
274#[allow(dead_code)]
275#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
276pub const COMMIT_DATE_2822 :&str = r#""#;
277
278#[doc=r#"
279The name of the Git branch that this project was built from.
280The time is formatted according to [RFC 3339 and ISO 8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
281
282This constant will be empty if the last commit cannot be determined."#]
283#[allow(dead_code)]
284#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
285pub const COMMIT_DATE_3339 :&str = r#""#;
286
287#[doc=r#"
288The e-mail address of the author of the Git commit that this project was built from.
289
290This constant will be empty if the last commit cannot be determined."#]
291#[allow(dead_code)]
292#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
293pub const COMMIT_EMAIL :&str = r#""#;
294
295#[doc=r#"
296The full commit hash of the Git commit that this project was built from.
297An abbreviated, but not necessarily unique, version of this is [`SHORT_COMMIT`].
298
299This constant will be empty if the last commit cannot be determined."#]
300#[allow(dead_code)]
301#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
302pub const COMMIT_HASH :&str = r#""#;
303
304#[doc=r#"
305Whether the Git working tree was clean at the time of project build (`true`), or not (`false`).
306
307This constant will be `false` if the last commit cannot be determined."#]
308#[allow(dead_code)]
309#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
310pub const GIT_CLEAN :bool = true;
311
312#[doc=r#"
313The Git working tree status as a list of files with their status, similar to `git status`.
314Each line of the list is preceded with ` * `, followed by the file name.
315Files marked `(dirty)` have unstaged changes.
316Files marked `(staged)` have staged changes.
317
318This constant will be empty if the working tree status cannot be determined."#]
319#[allow(dead_code)]
320#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
321pub const GIT_STATUS_FILE :&str = r#""#;
322
323#[doc=r#"
324The name of the last Git tag on the branch that this project was built from.
325As opposed to [`TAG`], this does not require the current commit to be tagged, just one of its parents.
326
327This constant will be empty if the last tag cannot be determined."#]
328#[allow(dead_code)]
329#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
330pub const LAST_TAG :&str = r#""#;
331
332#[doc=r#"
333The project's description, as determined by the Cargo.toml manifest."#]
334#[allow(dead_code)]
335#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
336pub const PKG_DESCRIPTION :&str = r#"devspace helps you to quickly start all the programs you need to dev using Tmux and other tools."#;
337
338#[doc=r#"
339The project's full version string, as determined by the Cargo.toml manifest."#]
340#[allow(dead_code)]
341#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
342pub const PKG_VERSION :&str = r#"0.1.0"#;
343
344#[doc=r#"
345The project's semver major version, as determined by the Cargo.toml manifest."#]
346#[allow(dead_code)]
347#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
348pub const PKG_VERSION_MAJOR :&str = r#"0"#;
349
350#[doc=r#"
351The project's semver minor version, as determined by the Cargo.toml manifest."#]
352#[allow(dead_code)]
353#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
354pub const PKG_VERSION_MINOR :&str = r#"1"#;
355
356#[doc=r#"
357The project's semver patch version, as determined by the Cargo.toml manifest."#]
358#[allow(dead_code)]
359#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
360pub const PKG_VERSION_PATCH :&str = r#"0"#;
361
362#[doc=r#"
363The project's semver pre-release version, as determined by the Cargo.toml manifest."#]
364#[allow(dead_code)]
365#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
366pub const PKG_VERSION_PRE :&str = r#""#;
367
368#[doc=r#"
369The project name, as determined by the Cargo.toml manifest."#]
370#[allow(dead_code)]
371#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
372pub const PROJECT_NAME :&str = r#"devspace"#;
373
374#[doc=r#"
375The [Rustup toolchain](https://rust-lang.github.io/rustup/concepts/toolchains.html) with which the project was built.
376Note that as per Rustup toolchain format, this variable may or may not contain host and date information,
377but it will always contain [channel](https://rust-lang.github.io/rustup/concepts/channels.html) information (stable, beta or nightly)."#]
378#[allow(dead_code)]
379#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
380pub const RUST_CHANNEL :&str = r#"nightly-x86_64-unknown-linux-gnu"#;
381
382#[doc=r#"
383Rust version with which the project was built.
384The version always uses the canonical Rust version format,
385and is therefore identical to the output of the build toolchain's `rustc --version`."#]
386#[allow(dead_code)]
387#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
388pub const RUST_VERSION :&str = r#"rustc 1.93.0-nightly (b15a874aa 2025-11-02)"#;
389
390#[doc=r#"
391The short hash of the Git commit that this project was built from.
392Note that this will always truncate [`COMMIT_HASH`] to 8 characters if necessary.
393Depending on the amount of commits in your project, this may not yield a unique Git identifier
394([see here for more details on hash abbreviation](https://git-scm.com/docs/git-describe#_examples)).
395
396This constant will be empty if the last commit cannot be determined."#]
397#[allow(dead_code)]
398#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
399pub const SHORT_COMMIT :&str = r#""#;
400
401#[doc=r#"
402The name of the Git tag that this project was built from.
403Note that this will be empty if there is no tag for the HEAD at the time of build."#]
404#[allow(dead_code)]
405#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
406pub const TAG :&str = r#""#;
407
408#[allow(dead_code,missing_docs)]
412#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
413pub const VERSION:&str = shadow_rs::formatcp!(r#"
414pkg_version:{}
415branch:{}
416commit_hash:{}
417build_time:{}
418build_env:{},{}"#,PKG_VERSION, BRANCH, SHORT_COMMIT, BUILD_TIME, RUST_VERSION, RUST_CHANNEL
419);
420
421
422#[allow(dead_code,missing_docs)]
426#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
427pub const CLAP_LONG_VERSION:&str = shadow_rs::formatcp!(r#"{}
428branch:{}
429commit_hash:{}
430build_time:{}
431build_env:{},{}"#,PKG_VERSION, BRANCH, SHORT_COMMIT, BUILD_TIME, RUST_VERSION, RUST_CHANNEL
432);
433
434
435#[allow(non_snake_case)]
438#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
439pub struct BuildInfoDisplay {
440 pub BRANCH: bool,
441 pub BUILD_OS: bool,
442 pub BUILD_RUST_CHANNEL: bool,
443 pub BUILD_TARGET: bool,
444 pub BUILD_TARGET_ARCH: bool,
445 pub BUILD_TIME: bool,
446 pub BUILD_TIME_2822: bool,
447 pub BUILD_TIME_3339: bool,
448 pub CARGO_MANIFEST_DIR: bool,
449 pub CARGO_TREE: bool,
450 pub CARGO_VERSION: bool,
451 pub COMMITS_SINCE_TAG: bool,
452 pub COMMIT_AUTHOR: bool,
453 pub COMMIT_DATE: bool,
454 pub COMMIT_DATE_2822: bool,
455 pub COMMIT_DATE_3339: bool,
456 pub COMMIT_EMAIL: bool,
457 pub COMMIT_HASH: bool,
458 pub GIT_CLEAN: bool,
459 pub GIT_STATUS_FILE: bool,
460 pub LAST_TAG: bool,
461 pub PKG_DESCRIPTION: bool,
462 pub PKG_VERSION: bool,
463 pub PKG_VERSION_MAJOR: bool,
464 pub PKG_VERSION_MINOR: bool,
465 pub PKG_VERSION_PATCH: bool,
466 pub PKG_VERSION_PRE: bool,
467 pub PROJECT_NAME: bool,
468 pub RUST_CHANNEL: bool,
469 pub RUST_VERSION: bool,
470 pub SHORT_COMMIT: bool,
471 pub TAG: bool,
472 pub VERSION: bool,
473 pub CLAP_LONG_VERSION: bool,
474}
475
476impl Default for BuildInfoDisplay {
477 #[allow(dead_code)]
478 #[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
479 fn default() -> Self {
482 Self {
483 BRANCH: true,
484 BUILD_OS: true,
485 BUILD_RUST_CHANNEL: true,
486 BUILD_TARGET: true,
487 BUILD_TARGET_ARCH: true,
488 BUILD_TIME: true,
489 BUILD_TIME_2822: true,
490 BUILD_TIME_3339: true,
491 CARGO_MANIFEST_DIR: true,
492 CARGO_TREE: true,
493 CARGO_VERSION: true,
494 COMMITS_SINCE_TAG: true,
495 COMMIT_AUTHOR: true,
496 COMMIT_DATE: true,
497 COMMIT_DATE_2822: true,
498 COMMIT_DATE_3339: true,
499 COMMIT_EMAIL: true,
500 COMMIT_HASH: true,
501 GIT_CLEAN: true,
502 GIT_STATUS_FILE: true,
503 LAST_TAG: true,
504 PKG_DESCRIPTION: true,
505 PKG_VERSION: true,
506 PKG_VERSION_MAJOR: true,
507 PKG_VERSION_MINOR: true,
508 PKG_VERSION_PATCH: true,
509 PKG_VERSION_PRE: true,
510 PROJECT_NAME: true,
511 RUST_CHANNEL: true,
512 RUST_VERSION: true,
513 SHORT_COMMIT: true,
514 TAG: true,
515 VERSION: true,
516 CLAP_LONG_VERSION: true,
517 }
518 }
519}
520
521impl BuildInfoDisplay {
522 #[allow(dead_code)]
523 #[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
524 pub fn all() -> Self {
526 Self {
527 BRANCH: true,
528 BUILD_OS: true,
529 BUILD_RUST_CHANNEL: true,
530 BUILD_TARGET: true,
531 BUILD_TARGET_ARCH: true,
532 BUILD_TIME: true,
533 BUILD_TIME_2822: true,
534 BUILD_TIME_3339: true,
535 CARGO_MANIFEST_DIR: true,
536 CARGO_TREE: true,
537 CARGO_VERSION: true,
538 COMMITS_SINCE_TAG: true,
539 COMMIT_AUTHOR: true,
540 COMMIT_DATE: true,
541 COMMIT_DATE_2822: true,
542 COMMIT_DATE_3339: true,
543 COMMIT_EMAIL: true,
544 COMMIT_HASH: true,
545 GIT_CLEAN: true,
546 GIT_STATUS_FILE: true,
547 LAST_TAG: true,
548 PKG_DESCRIPTION: true,
549 PKG_VERSION: true,
550 PKG_VERSION_MAJOR: true,
551 PKG_VERSION_MINOR: true,
552 PKG_VERSION_PATCH: true,
553 PKG_VERSION_PRE: true,
554 PROJECT_NAME: true,
555 RUST_CHANNEL: true,
556 RUST_VERSION: true,
557 SHORT_COMMIT: true,
558 TAG: true,
559 VERSION: true,
560 CLAP_LONG_VERSION: true,
561 }
562 }
563}
564
565impl core::fmt::Display for BuildInfoDisplay {
566 #[allow(dead_code)]
567 #[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
568 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
569 if self.BRANCH { writeln!(f, "BRANCH:{BRANCH}\n")?; }
570 if self.BUILD_OS { writeln!(f, "BUILD_OS:{BUILD_OS}\n")?; }
571 if self.BUILD_RUST_CHANNEL { writeln!(f, "BUILD_RUST_CHANNEL:{BUILD_RUST_CHANNEL}\n")?; }
572 if self.BUILD_TARGET { writeln!(f, "BUILD_TARGET:{BUILD_TARGET}\n")?; }
573 if self.BUILD_TARGET_ARCH { writeln!(f, "BUILD_TARGET_ARCH:{BUILD_TARGET_ARCH}\n")?; }
574 if self.BUILD_TIME { writeln!(f, "BUILD_TIME:{BUILD_TIME}\n")?; }
575 if self.BUILD_TIME_2822 { writeln!(f, "BUILD_TIME_2822:{BUILD_TIME_2822}\n")?; }
576 if self.BUILD_TIME_3339 { writeln!(f, "BUILD_TIME_3339:{BUILD_TIME_3339}\n")?; }
577 if self.CARGO_MANIFEST_DIR { writeln!(f, "CARGO_MANIFEST_DIR:{CARGO_MANIFEST_DIR}\n")?; }
578 if self.CARGO_TREE { writeln!(f, "CARGO_TREE:{CARGO_TREE}\n")?; }
579 if self.CARGO_VERSION { writeln!(f, "CARGO_VERSION:{CARGO_VERSION}\n")?; }
580 if self.COMMITS_SINCE_TAG { writeln!(f, "COMMITS_SINCE_TAG:{COMMITS_SINCE_TAG}\n")?; }
581 if self.COMMIT_AUTHOR { writeln!(f, "COMMIT_AUTHOR:{COMMIT_AUTHOR}\n")?; }
582 if self.COMMIT_DATE { writeln!(f, "COMMIT_DATE:{COMMIT_DATE}\n")?; }
583 if self.COMMIT_DATE_2822 { writeln!(f, "COMMIT_DATE_2822:{COMMIT_DATE_2822}\n")?; }
584 if self.COMMIT_DATE_3339 { writeln!(f, "COMMIT_DATE_3339:{COMMIT_DATE_3339}\n")?; }
585 if self.COMMIT_EMAIL { writeln!(f, "COMMIT_EMAIL:{COMMIT_EMAIL}\n")?; }
586 if self.COMMIT_HASH { writeln!(f, "COMMIT_HASH:{COMMIT_HASH}\n")?; }
587 if self.GIT_CLEAN { writeln!(f, "GIT_CLEAN:{GIT_CLEAN}\n")?; }
588 if self.GIT_STATUS_FILE { writeln!(f, "GIT_STATUS_FILE:{GIT_STATUS_FILE}\n")?; }
589 if self.LAST_TAG { writeln!(f, "LAST_TAG:{LAST_TAG}\n")?; }
590 if self.PKG_DESCRIPTION { writeln!(f, "PKG_DESCRIPTION:{PKG_DESCRIPTION}\n")?; }
591 if self.PKG_VERSION { writeln!(f, "PKG_VERSION:{PKG_VERSION}\n")?; }
592 if self.PKG_VERSION_MAJOR { writeln!(f, "PKG_VERSION_MAJOR:{PKG_VERSION_MAJOR}\n")?; }
593 if self.PKG_VERSION_MINOR { writeln!(f, "PKG_VERSION_MINOR:{PKG_VERSION_MINOR}\n")?; }
594 if self.PKG_VERSION_PATCH { writeln!(f, "PKG_VERSION_PATCH:{PKG_VERSION_PATCH}\n")?; }
595 if self.PKG_VERSION_PRE { writeln!(f, "PKG_VERSION_PRE:{PKG_VERSION_PRE}\n")?; }
596 if self.PROJECT_NAME { writeln!(f, "PROJECT_NAME:{PROJECT_NAME}\n")?; }
597 if self.RUST_CHANNEL { writeln!(f, "RUST_CHANNEL:{RUST_CHANNEL}\n")?; }
598 if self.RUST_VERSION { writeln!(f, "RUST_VERSION:{RUST_VERSION}\n")?; }
599 if self.SHORT_COMMIT { writeln!(f, "SHORT_COMMIT:{SHORT_COMMIT}\n")?; }
600 if self.TAG { writeln!(f, "TAG:{TAG}\n")?; }
601 if self.VERSION { writeln!(f, "VERSION:{VERSION}\n")?; }
602 if self.CLAP_LONG_VERSION { writeln!(f, "CLAP_LONG_VERSION:{CLAP_LONG_VERSION}\n")?; }
603 Ok(())
604 }
605}
606
607#[allow(dead_code)]
610#[allow(clippy::all, clippy::pedantic, clippy::restriction, clippy::nursery)]
611pub fn print_build_in() {
612 println!("{}", BuildInfoDisplay::default());
613}
614