Skip to content

Extract git config variables as global dynamic variables #95

@fpringle

Description

@fpringle

It would be great to give the option to extract dynamic variables from the git (local or global) config, such as author and email. I assume there's an equivalent for other VCS systems.

e.g. a haskell.mustache file could look like this:

{-|                                                                                                                                     
Module      : {{{ _haskell_module_name }}}                                                                                              
Copyright   : (c) {{ _current_year }} {{ _git_user_name }}                                                                                     
License     : BSD-3                                                                                                                     
Maintainer  : {{ _git_user_email }}                                                                                                               
                                                                                                                                        
{{{ _haskell_module_longdesc }}}                                                                                                        
-}

Then _git_user_name would be replaced by the output of git config --get user.name, and likewise with _git_user_email.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestresearchSome research must be done before implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions