From 35565d07c252a8655df23d6d99bb315e29eef318 Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Mon, 6 Mar 2023 20:18:23 +0200 Subject: [PATCH] 0.3.1 - added `COMMIT_HASH` const - updated core library --- Cargo.toml | 3 ++- anime-game-core | 2 +- build.rs | 7 +++++++ src/lib.rs | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 build.rs diff --git a/Cargo.toml b/Cargo.toml index 10d9d3b..f8ea885 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,11 @@ [package] name = "anime-launcher-sdk" -version = "0.3.0" +version = "0.3.1" authors = ["Nikita Podvirnyy "] license = "GPL-3.0" readme = "README.md" edition = "2021" +build = "build.rs" [dependencies] anime-game-core = { path = "anime-game-core", features = ["genshin", "all", "static"] } diff --git a/anime-game-core b/anime-game-core index 33dce6a..45894e7 160000 --- a/anime-game-core +++ b/anime-game-core @@ -1 +1 @@ -Subproject commit 33dce6a6d0202e1f8b17a8193603cc05c4d6a5ef +Subproject commit 45894e77c9ec1fcfe264c80f6a39774876413386 diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..b2b6c33 --- /dev/null +++ b/build.rs @@ -0,0 +1,7 @@ +use std::process::Command; + +fn main() { + let output = Command::new("git").args(&["rev-parse", "HEAD"]).output().unwrap(); + + println!("cargo:rustc-env=GIT_COMMIT_HASH={}", String::from_utf8(output.stdout).unwrap()); +} diff --git a/src/lib.rs b/src/lib.rs index 8e24cde..cb22a51 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,6 +24,7 @@ pub mod fps_unlocker; pub mod discord_rpc; pub const VERSION: &str = env!("CARGO_PKG_VERSION"); +pub const COMMIT_HASH: &str = env!("GIT_COMMIT_HASH"); /// Check if specified binary is available ///