#git-version #git #build #version

build comfy-git-version

A comfy fork of git-version: compile the git version (tag name, or hash otherwise) and dirty state into your program

1 unstable release

0.4.0 Sep 24, 2023

#642 in Build Utils

34 downloads per month
Used in 2 crates (via comfy-core)

BSD-2-Clause

4KB

git-version

Embed git information in your code at compile-time.

use git_version::git_version;
const GIT_VERSION: &str = git_version!();

The version number will have a -modified suffix if your git worktree had untracked or changed files.

These macros do not depend on libgit, but simply uses the git binary directly. So you must have git installed somewhere in your PATH.

License: BSD-2-Clause


lib.rs:

Embed git information in your code at compile-time.

use comfy_git_version::git_version;
const GIT_VERSION: &str = git_version!();

The version number will have a -modified suffix if your git worktree had untracked or changed files.

These macros do not depend on libgit, but simply uses the git binary directly. So you must have git installed somewhere in your PATH.

Dependencies