#git-version #git #version #build

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

#486 in Build Utils

Download history 19/week @ 2024-01-12 15/week @ 2024-01-19 28/week @ 2024-01-26 6/week @ 2024-02-02 13/week @ 2024-02-09 26/week @ 2024-02-16 51/week @ 2024-02-23 43/week @ 2024-03-01 42/week @ 2024-03-08 53/week @ 2024-03-15 40/week @ 2024-03-22 42/week @ 2024-03-29 27/week @ 2024-04-05 35/week @ 2024-04-12 46/week @ 2024-04-19 28/week @ 2024-04-26

142 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