Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
[feature] ;release command
Browse files Browse the repository at this point in the history
  • Loading branch information
5HT2 committed Dec 2, 2020
1 parent e56aab4 commit f4c3cda
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/Permissions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ enum class PermissionTypes {
MANAGE_CHANNELS,
MASS_BAN,
APPROVE_ISSUE_CREATION,
AUTHORIZE_CAPES
AUTHORIZE_CAPES,
CREATE_RELEASE
}
24 changes: 24 additions & 0 deletions src/main/kotlin/commands/ReleaseCommand.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.kamiblue.botkt.commands

import org.kamiblue.botkt.Command
import org.kamiblue.botkt.PermissionTypes.CREATE_RELEASE
import org.kamiblue.botkt.doesLaterIfHas
import org.kamiblue.botkt.helpers.ShellHelper.systemBash
import org.kamiblue.botkt.literal

// TODO hardcoded, pending plugin support
object ReleaseCommand : Command("release") {
init {
literal("major") {
doesLaterIfHas(CREATE_RELEASE) {
"./scripts/runAutomatedRelease.sh major".systemBash("/home/mika/kamiblue")
}
}

literal("beta") {
doesLaterIfHas(CREATE_RELEASE) {
"./scripts/runAutomatedRelease.sh".systemBash("/home/mika/kamiblue")
}
}
}
}

0 comments on commit f4c3cda

Please sign in to comment.