From 589b4bce398055d625bddd4443233b424148bfc8 Mon Sep 17 00:00:00 2001 From: James Reynolds Date: Thu, 30 Dec 2021 15:27:20 -0700 Subject: [PATCH] Added docker environment variables for author and email (#1789) Sets git user.name and user.email if env var is set --- docker-run.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker-run.sh b/docker-run.sh index 5cd39693..9e7721b5 100755 --- a/docker-run.sh +++ b/docker-run.sh @@ -5,6 +5,14 @@ if [ ! -d .git ]; then git init fi +# Set git user.name and user.email +if [ ${GOLLUM_AUTHOR_USERNAME:+1} ]; then + git config user.name "${GOLLUM_AUTHOR_USERNAME}" +fi +if [ ${GOLLUM_AUTHOR_EMAIL:+1} ]; then + git config user.email "${GOLLUM_AUTHOR_EMAIL}" +fi + # Start gollum service [[ "$@" != *--mathjax* ]] && echo "WARNING: Mathjax will soon be disabled by default. To explicitly enable it, use --mathjax" >&2 exec gollum $@ --mathjax