diff --git a/vars/util.groovy b/vars/util.groovy index 50eb14a..2a8a248 100644 --- a/vars/util.groovy +++ b/vars/util.groovy @@ -1,8 +1,6 @@ #!/usr/bin/env groovy -sh 'printenv' - -def sendEmail() { +def setEnv() { if (!env.GIT_COMMITTER_EMAIL) { env.COMMITTER_EMAIL = sh( script: 'git --no-pager show -s --format="%ae"', @@ -12,6 +10,10 @@ def sendEmail() { env.COMMITTER_EMAIL = env.GIT_COMMITTER_EMAIL; } + sh 'printenv' +} + +def sendEmail() { if (!env.COMMITTER_EMAIL) return try { mail(