2个版本
0.1.1 | 2019年4月23日 |
---|---|
0.1.0 | 2019年4月23日 |
#31 in #describe
66 每月下载量
5KB
56 代码行
build-version
为Rust应用程序提供git版本信息
lib.rs
:
从git获取应用程序版本信息
从git命令 git describe --tags --always
创建常量GIT_BUILD_VERSION
添加到 bulid.rs
extern crate build_version;
fn main() {
build_version::write_version_file().expect("Failed to write version.rs file");
}
添加到 main.rs
include!(concat!(env!("OUT_DIR"), "/version.rs"));
依赖
~47KB