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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
// Code automatically generated by `shadow-rs` (https://github.com/baoyachi/shadow-rs), do not edit.
// Author: https://www.github.com/baoyachi
// Generation time: 2024-10-18 08:58:55 +00:00



#[doc=r#"
The name of the Git branch that this project was built from.

This constant will be empty if the branch cannot be determined."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const BRANCH :&str = r#"main"#;

#[doc=r#"
Operating system and architecture on which the project was build.
The format of this variable is always `os-arch`,
where `os` is the operating system name as returned by [`std::env::consts::OS`],
and `arch` is the computer architecture as returned by [`std::env::consts::ARCH`]."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const BUILD_OS :&str = r#"linux-x86_64"#;

#[doc=r#"
The debug configuration with which the project was built.
Note that this is not the Rust channel, but either `debug` or `release`, depending on whether debug assertions were enabled in the build or not. "#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const BUILD_RUST_CHANNEL :&str = r#"debug"#;

#[doc=r#"
The [target](https://doc.rust-lang.org/rustc/targets/index.html) for this build.
This is possibly distinct from the host target during build, in which case this project build was created via cross-compilation."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const BUILD_TARGET :&str = r#"x86_64-unknown-linux-gnu"#;

#[doc=r#"
The architecture of the target for this build. This is the "architecture" part of the [`BUILD_TARGET`] constant."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const BUILD_TARGET_ARCH :&str = r#"x86_64"#;

#[doc=r#"
The project build time, formatted in modified ISO 8601 format (`YYYY-MM-DD HH-MM ±hh-mm` where hh-mm is the offset from UTC)."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const BUILD_TIME :&str = r#"2024-10-18 08:58:48 +00:00"#;

#[doc=r#"
The project build time, formatted according to [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) (e.g. HTTP Headers)."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const BUILD_TIME_2822 :&str = r#"Fri, 18 Oct 2024 08:58:48 +0000"#;

#[doc=r#"
The project build time, formatted according to [RFC 3339 and ISO 8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const BUILD_TIME_3339 :&str = r#"2024-10-18T08:58:48Z"#;

#[doc=r#"
The directory of the Cargo.toml manifest file of the project during build.
Note that this variable will contain a full local file system path, and will therefore contain sensitive information and not be reproducible."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const CARGO_MANIFEST_DIR :&str = r#"/home/runner/work/greptimedb/greptimedb/src/common/version"#;

#[doc=r#"
The cargo version which which the project was built, as output by `cargo --version`."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const CARGO_VERSION :&str = r#"cargo 1.80.0-nightly (34a6a87d8 2024-06-04)"#;

#[doc=r#"
The author of the Git commit that this project was built from.

This constant will be empty if the last commit cannot be determined."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const COMMIT_AUTHOR :&str = r#"Yingwen"#;

#[doc=r#"The time of the Git commit that this project was built from.
The time is formatted in modified ISO 8601 format (`YYYY-MM-DD HH-MM ±hh-mm` where hh-mm is the offset from UTC).

This constant will be empty if the last commit cannot be determined."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const COMMIT_DATE :&str = r#"2024-10-18 08:42:01 +00:00"#;

#[doc=r#"
The name of the Git branch that this project was built from.
The time is formatted according to [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) (e.g. HTTP Headers).

This constant will be empty if the last commit cannot be determined."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const COMMIT_DATE_2822 :&str = r#"Fri, 18 Oct 2024 08:42:01 +0000"#;

#[doc=r#"
The name of the Git branch that this project was built from.
The time is formatted according to [RFC 3339 and ISO 8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).

This constant will be empty if the last commit cannot be determined."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const COMMIT_DATE_3339 :&str = r#"2024-10-18T08:42:01Z"#;

#[doc=r#"
The e-mail address of the author of the Git commit that this project was built from.

This constant will be empty if the last commit cannot be determined."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const COMMIT_EMAIL :&str = r#"realevenyag@gmail.com"#;

#[doc=r#"
The full commit hash of the Git commit that this project was built from.
An abbreviated, but not necessarily unique, version of this is [`SHORT_COMMIT`].

This constant will be empty if the last commit cannot be determined."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const COMMIT_HASH :&str = r#"2ee1ce2ba1ecba515761a87f1bad17c8fd626176"#;

#[doc=r#"
Whether the Git working tree was clean at the time of project build (`true`), or not (`false`).

This constant will be `false` if the last commit cannot be determined."#]
#[allow(dead_code)]
pub const GIT_CLEAN :bool = true;

#[doc=r#"
The Git working tree status as a list of files with their status, similar to `git status`.
Each line of the list is preceded with `  * `, followed by the file name.
Files marked `(dirty)` have unstaged changes.
Files marked `(staged)` have staged changes.

This constant will be empty if the working tree status cannot be determined."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const GIT_STATUS_FILE :&str = r#""#;

#[doc=r#"
The name of the last Git tag on the branch that this project was built from.
As opposed to [`TAG`], this does not require the current commit to be tagged, just one of its parents.

This constant will be empty if the last tag cannot be determined."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const LAST_TAG :&str = r#""#;

#[doc=r#"
The project's description, as determined by the Cargo.toml manifest."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const PKG_DESCRIPTION :&str = r#""#;

#[doc=r#"
The project's full version string, as determined by the Cargo.toml manifest."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const PKG_VERSION :&str = r#"0.9.5"#;

#[doc=r#"
The project's semver major version, as determined by the Cargo.toml manifest."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const PKG_VERSION_MAJOR :&str = r#"0"#;

#[doc=r#"
The project's semver minor version, as determined by the Cargo.toml manifest."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const PKG_VERSION_MINOR :&str = r#"9"#;

#[doc=r#"
The project's semver patch version, as determined by the Cargo.toml manifest."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const PKG_VERSION_PATCH :&str = r#"5"#;

#[doc=r#"
The project's semver pre-release version, as determined by the Cargo.toml manifest."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const PKG_VERSION_PRE :&str = r#""#;

#[doc=r#"
The project name, as determined by the Cargo.toml manifest."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const PROJECT_NAME :&str = r#"common-version"#;

#[doc=r#"
The [Rustup toolchain](https://rust-lang.github.io/rustup/concepts/toolchains.html) with which the project was built.
Note that as per Rustup toolchain format, this variable may or may not contain host and date information,
but it will always contain [channel](https://rust-lang.github.io/rustup/concepts/channels.html) information (stable, beta or nightly)."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const RUST_CHANNEL :&str = r#"nightly-2024-06-06-x86_64-unknown-linux-gnu"#;

#[doc=r#"
Rust version with which the project was built.
The version always uses the canonical Rust version format,
and is therefore identical to the output of the build toolchain's `rustc --version`."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const RUST_VERSION :&str = r#"rustc 1.80.0-nightly (72fdf913c 2024-06-05)"#;

#[doc=r#"
The short hash of the Git commit that this project was built from.
Note that this will always truncate [`COMMIT_HASH`] to 8 characters if necessary.
Depending on the amount of commits in your project, this may not yield a unique Git identifier
([see here for more details on hash abbreviation](https://git-scm.com/docs/git-describe#_examples)).

This constant will be empty if the last commit cannot be determined."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const SHORT_COMMIT :&str = r#"2ee1ce2b"#;

#[doc=r#"
The name of the Git tag that this project was built from.
Note that this will be empty if there is no tag for the HEAD at the time of build."#]
#[allow(dead_code)]
#[allow(clippy::all)]
pub const TAG :&str = r#""#;


/// A long version string describing the project.
/// The version string contains the package version, branch, commit hash, build time, and build environment on separate lines.
/// This constant is suitable for printing to the user.
#[allow(dead_code)]
pub const VERSION:&str = shadow_rs::formatcp!(r#"
pkg_version:{}
branch:{}
commit_hash:{}
build_time:{}
build_env:{},{}"#,PKG_VERSION, BRANCH, SHORT_COMMIT, BUILD_TIME, RUST_VERSION, RUST_CHANNEL
);

#[allow(dead_code,missing_docs)]
#[deprecated = "Replaced with `CLAP_LONG_VERSION`"]
pub const CLAP_VERSION:&str = shadow_rs::formatcp!(r#"{}
branch:{}
commit_hash:{}
build_time:{}
build_env:{},{}"#,PKG_VERSION, BRANCH, SHORT_COMMIT, BUILD_TIME, RUST_VERSION, RUST_CHANNEL
);


/// A long version string describing the project.
/// The version string contains the package version, branch, commit hash, build time, and build environment on separate lines.
/// This constant is intended to be used by clap or other CLI tools as a long version string.
#[allow(dead_code)]
pub const CLAP_LONG_VERSION:&str = shadow_rs::formatcp!(r#"{}
branch:{}
commit_hash:{}
build_time:{}
build_env:{},{}"#,PKG_VERSION, BRANCH, SHORT_COMMIT, BUILD_TIME, RUST_VERSION, RUST_CHANNEL
);

/// Prints all built-in `shadow-rs` build constants to standard output.
#[allow(dead_code)]
pub fn print_build_in() {
	println!("BRANCH:{BRANCH}\n");
	println!("BUILD_OS:{BUILD_OS}\n");
	println!("BUILD_RUST_CHANNEL:{BUILD_RUST_CHANNEL}\n");
	println!("BUILD_TARGET:{BUILD_TARGET}\n");
	println!("BUILD_TARGET_ARCH:{BUILD_TARGET_ARCH}\n");
	println!("BUILD_TIME:{BUILD_TIME}\n");
	println!("BUILD_TIME_2822:{BUILD_TIME_2822}\n");
	println!("BUILD_TIME_3339:{BUILD_TIME_3339}\n");
	println!("CARGO_MANIFEST_DIR:{CARGO_MANIFEST_DIR}\n");
	println!("CARGO_VERSION:{CARGO_VERSION}\n");
	println!("COMMIT_AUTHOR:{COMMIT_AUTHOR}\n");
	println!("COMMIT_DATE:{COMMIT_DATE}\n");
	println!("COMMIT_DATE_2822:{COMMIT_DATE_2822}\n");
	println!("COMMIT_DATE_3339:{COMMIT_DATE_3339}\n");
	println!("COMMIT_EMAIL:{COMMIT_EMAIL}\n");
	println!("COMMIT_HASH:{COMMIT_HASH}\n");
	println!("GIT_CLEAN:{GIT_CLEAN}\n");
	println!("GIT_STATUS_FILE:{GIT_STATUS_FILE}\n");
	println!("LAST_TAG:{LAST_TAG}\n");
	println!("PKG_DESCRIPTION:{PKG_DESCRIPTION}\n");
	println!("PKG_VERSION:{PKG_VERSION}\n");
	println!("PKG_VERSION_MAJOR:{PKG_VERSION_MAJOR}\n");
	println!("PKG_VERSION_MINOR:{PKG_VERSION_MINOR}\n");
	println!("PKG_VERSION_PATCH:{PKG_VERSION_PATCH}\n");
	println!("PKG_VERSION_PRE:{PKG_VERSION_PRE}\n");
	println!("PROJECT_NAME:{PROJECT_NAME}\n");
	println!("RUST_CHANNEL:{RUST_CHANNEL}\n");
	println!("RUST_VERSION:{RUST_VERSION}\n");
	println!("SHORT_COMMIT:{SHORT_COMMIT}\n");
	println!("TAG:{TAG}\n");
	println!("VERSION:{VERSION}\n");
	println!("CLAP_LONG_VERSION:{CLAP_LONG_VERSION}\n");
}