User Configuration
drom
will extract some information from the environement, from
both configuration files and environement variables.
Configuration Files
drom
uses a configuration file for some user-specific
information. The configuration file is search in 2 locations:
In
$HOME/.config/drom/config
firstIn
$HOME/.drom/config
otherwise
If no configuration file is found, drom
will generate the
following template in .config/drom/config
:
[user]
# author = "Author Name <email>"
# github-organization = "...organization..."
# license = "...license..."
# copyright = "Company Ltd"
# opam-repo = "/home/user/GIT/opam-repository"
These fields are used as default values when calling
drom
. Most of them are used by drom project
, except
opam-repo
which is used by drom publish
to find an
opam repository where to save new project descriptions.
If the author
field is not specified, drom
will try to
compute it from git
configuration file in
$HOME/.gitconfig
.
Environment Variables
The following environment variables will take precedence over the
values found in drom
configuration file:
DROM_AUTHOR
overridesauthor
DROM_GITHUB_ORGANIZATION
overridesgithub-organization
DROM_LICENSE
overrideslicense
DROM_COPYRIGHT
overridescopyright
DROM_OPAM_REPO
overridesopam-repo
The following environment variables are used to compute the
author
field if not found:
For the name:
DROM_USER
GIT_AUTHOR_NAME
GIT_COMMITTER_NAME
from
git
configuration fileUSER
USERNAME
NAME
For the email:
DROM_EMAIL
GIT_AUTHOR_EMAIL
GIT_COMMITTER_EMAIL
from
git
configuration file