Add ktlint to deployment process

This commit is contained in:
kageru 2019-11-14 14:58:01 +01:00
parent cd9ee0e881
commit 5c7efcd10e
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2
3 changed files with 5 additions and 3 deletions

2
check.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
ktlint --disabled_rules import-ordering,no-wildcard-imports

View File

@ -1,5 +1,5 @@
#!/bin/sh
if gradle test; then
if ./check.sh && gradle test; then
gradle shadowjar
scp build/libs/moe.kageru.kagebot-0.1-all.jar lain:/home/selphybot/bot.jar
ssh lain sudo systemctl restart selphybot.service

View File

@ -22,7 +22,7 @@ class Permissions(
message.messageAuthor.isBotOwner -> true
onlyDM && !message.isPrivateMessage -> false
// returns true if the Option is empty (case for no restrictions)
else -> hasOneOf.forall { Util.hasOneOf(message.messageAuthor, it) }
&& hasNoneOf.forall { !Util.hasOneOf(message.messageAuthor, it) }
else -> hasOneOf.forall { Util.hasOneOf(message.messageAuthor, it) } &&
hasNoneOf.forall { !Util.hasOneOf(message.messageAuthor, it) }
}
}