[![ version](](

Provider for generate the version from git.

It is a plugin for [rebar3](

## Overview
When we use the `{vsn, git}`, it can be generated to automatically version from git hash.  
However, it does not mean use at any time.  
For example, if you want to publish to [hex](, it is not a recommended way.

This plugin works as follows:

- If `${APP_DIR}/.git` is exist, add the version of git to the `.app` file.
- If `${APP_DIR}/.git` isn't exist, it does noting.

This will help in providing functions such as `my_escript --version`.

## Usage

%% rebar.config
{plugins, [rebar3_git_vsn]}.

{provider_hooks, [{post, [{compile, git_vsn}]}]}.

  %% Where to write the git vsn. (default: git_vsn)
  %% application:get_env(Application, EnvKey)
  {env_key, git_vsn},

  %% Git describe option. (default: "")
  {describe_opt, "--tags --long"}

## License
[MIT License](LICENSE)