diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-04-05 01:00:13 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-04-05 01:41:15 +0200 |
| commit | b3faef4b80a674294091066e20501e3a5d0f6103 (patch) | |
| tree | 0fac232cc0800f584a1ab8dffd2c54a7220ba18d /cli | |
| parent | 205b9f3f2513d15406c47273ca035272db515490 (diff) | |
Bump versionv0.1.0
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/Cargo.toml | 2 | ||||
| -rw-r--r-- | cli/build.rs | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 8b0f3517..d5178b54 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "typst-cli" -version = "0.0.0" +version = "0.1.0" authors = ["The Typst Project Developers"] edition = "2021" diff --git a/cli/build.rs b/cli/build.rs index 47809487..014960f4 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -6,12 +6,14 @@ fn main() { return; } - let version = Command::new("git") + let pkg = env!("CARGO_PKG_VERSION"); + let hash = Command::new("git") .args(["rev-parse", "HEAD"]) .output() .ok() .filter(|output| output.status.success()) .and_then(|output| String::from_utf8(output.stdout.get(..8)?.into()).ok()) - .unwrap_or_else(|| "(unknown version)".into()); - println!("cargo:rustc-env=TYPST_VERSION={version}"); + .unwrap_or_else(|| "(unknown hash)".into()); + + println!("cargo:rustc-env=TYPST_VERSION={pkg} ({hash})"); } |
