sendEmail fixes

This commit is contained in:
Juan Ferrer 2020-01-30 16:12:54 +01:00
parent 9c953ea25b
commit b16ed615cf
1 changed files with 9 additions and 9 deletions

View File

@ -1,15 +1,15 @@
#!/usr/bin/env groovy
if (!env.GIT_COMMITTER_EMAIL) {
env.COMMITTER_EMAIL = sh(
script: 'git --no-pager show -s --format="%ae"',
returnStdout: true
).trim()
} else {
env.COMMITTER_EMAIL = env.GIT_COMMITTER_EMAIL;
}
def sendEmail() {
if (!env.GIT_COMMITTER_EMAIL) {
env.COMMITTER_EMAIL = sh(
script: 'git --no-pager show -s --format="%ae"',
returnStdout: true
).trim()
} else {
env.COMMITTER_EMAIL = env.GIT_COMMITTER_EMAIL;
}
if (!env.COMMITTER_EMAIL) return
try {
mail(