move to different folder in jenkins and update formatting

This commit is contained in:
gamma-delta 2022-04-04 17:48:19 -05:00
parent 8e6be11660
commit 7fed08890b

View file

@ -292,21 +292,21 @@ def getGitChangelog = { ->
def travisRange = System.getenv('TRAVIS_COMMIT_RANGE')
if (gitHash && gitPrevHash) {
exec {
commandLine 'git', 'log', '--pretty=tformat:- %s', '' + gitPrevHash + '...' + gitHash
commandLine 'git', 'log', '--pretty=tformat:> %s', '' + gitPrevHash + '...' + gitHash
standardOutput = stdout
}
return stdout.toString().trim()
} else if (travisRange) {
exec {
commandLine 'git', 'log', '--pretty=tformat:- %s', '' + travisRange
commandLine 'git', 'log', '--pretty=tformat:> %s', '' + travisRange
standardOutput = stdout
}
return stdout.toString().trim()
} else {
return "";
return ""
}
} catch (ignored) {
return "";
return ""
}
}
@ -318,11 +318,11 @@ task sendWebhook {
println "Cannot send the webhook without the webhook url or the build url"
return
}
def webhook = new Webhook(System.getenv('discordWebhook'), 'HexMod Patreon Gradle')
def webhook = new Webhook(System.getenv('discordWebhook'), 'Petrak@ Patreon Gradle')
def message = new Message()
message.setUsername("Patreon early access")
message.setContent("New HexMod release! Download it here: ${System.getenv("BUILD_URL")}\nChangelog:\n${getGitChangelog()}")
message.setUsername("Patreon Early Access")
message.setContent("New Hexcasting release! Download it here: ${System.getenv("BUILD_URL")}\nChangelog:\n${getGitChangelog()}")
webhook.sendMessage(message)
} catch (ignored) {