Only post the webhook once
This commit is contained in:
parent
a4a9f21602
commit
ef40b86ede
1 changed files with 16 additions and 10 deletions
|
@ -312,6 +312,8 @@ def getGitChangelog = { ->
|
|||
|
||||
task sendWebhook {
|
||||
|
||||
doLast {
|
||||
try {
|
||||
if (System.getenv('discordWebhook') == null || System.getenv("BUILD_URL") == null) {
|
||||
println "Cannot send the webhook without the webhook url or the build url"
|
||||
return
|
||||
|
@ -323,5 +325,9 @@ task sendWebhook {
|
|||
message.setContent("New HexMod release! Download it here: ${System.getenv("BUILD_URL")}\nChangelog:\n${getGitChangelog()}")
|
||||
|
||||
webhook.sendMessage(message)
|
||||
} catch (ignored) {
|
||||
project.logger.error("Failed to push Discord webhook.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue