2 releases

0.1.1 Apr 23, 2019
0.1.0 Apr 23, 2019

#9 in #version-info

Download history 26/week @ 2024-11-13 12/week @ 2024-11-20 17/week @ 2024-11-27 18/week @ 2024-12-04 19/week @ 2024-12-11 6/week @ 2024-12-18 19/week @ 2025-01-01 11/week @ 2025-01-08 12/week @ 2025-01-15 9/week @ 2025-01-22 27/week @ 2025-01-29 26/week @ 2025-02-05 26/week @ 2025-02-12 9/week @ 2025-02-19 37/week @ 2025-02-26

101 downloads per month

LGPL-3.0-or-later

5KB
56 lines

build-version

Build status

git version for rust applications


lib.rs:

Application version information from git

Creates constant GIT_BUILD_VERSION from git command git describe --tags --always

Add to bulid.rs:

extern crate build_version;
fn main() {
    build_version::write_version_file().expect("Failed to write version.rs file");
}

Add to main.rs:

include!(concat!(env!("OUT_DIR"), "/version.rs"));

Dependencies

~47KB