summaryrefslogtreecommitdiff
path: root/templates/compile_info.rs.template
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-01-23 03:18:53 +0800
committer魏曹先生 <1992414357@qq.com>2026-01-23 03:18:53 +0800
commit5b5e3b2b9375fea3e47c28c2a4d47ef4fe349cd5 (patch)
tree8ce34729fda126e6a06ca881911e19a2c429441c /templates/compile_info.rs.template
parent9880a6409e8eed4e1210406603d8aff65fac6a0c (diff)
Rename generated files with leading underscore
- Rename template files to have .template extension - Rename generated source files to start with underscore - Update .gitignore to ignore all files starting with underscore - Update build.rs and deploy.ps1 to reflect new names
Diffstat (limited to 'templates/compile_info.rs.template')
-rw-r--r--templates/compile_info.rs.template24
1 files changed, 24 insertions, 0 deletions
diff --git a/templates/compile_info.rs.template b/templates/compile_info.rs.template
new file mode 100644
index 0000000..b65055b
--- /dev/null
+++ b/templates/compile_info.rs.template
@@ -0,0 +1,24 @@
+pub struct CompileInfo {
+ pub date: String,
+ pub target: String,
+ pub platform: String,
+ pub toolchain: String,
+
+ pub cli_version: String,
+ pub build_branch: String,
+ pub build_commit: String,
+}
+
+impl Default for CompileInfo {
+ fn default() -> Self {
+ Self {
+ date: "{date}".to_string(),
+ target: "{target}".to_string(),
+ platform: "{platform}".to_string(),
+ toolchain: "{toolchain}".to_string(),
+ cli_version: "{version}".to_string(),
+ build_branch: "{branch}".to_string(),
+ build_commit: "{commit}".to_string(),
+ }
+ }
+}