Code refactor
This commit is contained in:
parent
4f7aaca9d6
commit
3a1a37aa09
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env groovy
|
||||
|
||||
def call() {
|
||||
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;
|
||||
}
|
||||
|
||||
sh 'printenv'
|
||||
}
|
|
@ -1,19 +1,6 @@
|
|||
#!/usr/bin/env groovy
|
||||
|
||||
def setEnv() {
|
||||
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;
|
||||
}
|
||||
|
||||
sh 'printenv'
|
||||
}
|
||||
|
||||
def sendEmail() {
|
||||
def call() {
|
||||
if (!env.COMMITTER_EMAIL) return
|
||||
try {
|
||||
mail(
|
Loading…
Reference in New Issue