Skip to content

Commit

Permalink
make the version definer a bit more functional so I dont need to comm…
Browse files Browse the repository at this point in the history
…ent in and out all the time, also comment out the doc-gen for now
  • Loading branch information
NotJansel committed Aug 24, 2024
1 parent 099209f commit e6d7484
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
19 changes: 12 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,21 @@ fun String.runCommand(

group = "org.hyacinthbots.allium"

version = "0.7-build.local-" +
"git rev-parse --short=8 HEAD"
.runCommand(workingDir = rootDir) +
"-" +
"git branch --show-current"
version = if ("git branch --show-current"
.runCommand(workingDir = rootDir)
.replace("/", ".")
.replace("/", ".") == "root") {
"0.7"
} else {
"0.7-build.local-" +
"git rev-parse --short=8 HEAD"
.runCommand(workingDir = rootDir) +
"-" +
"git branch --show-current"
.runCommand(workingDir = rootDir)
.replace("/", ".")
}

var buildTime = Date().time / 1000
// version = "0.6.5"

sourceSets {
main {
Expand Down
7 changes: 2 additions & 5 deletions src/main/kotlin/org/hyacinthbots/allium/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,10 @@ import kotlinx.coroutines.flow.count
import org.hyacinthbots.allium.extensions.*
import org.hyacinthbots.allium.utils.BUILD
import org.hyacinthbots.allium.utils.BUILDTIME
import org.hyacinthbots.allium.utils.ENVIRONMENT
import org.hyacinthbots.allium.utils.TOKEN
import org.hyacinthbots.allium.utils.database
import org.hyacinthbots.allium.utils.getRandomUpdateMessage
import org.hyacinthbots.docgenerator.docsGenerator
import org.hyacinthbots.docgenerator.enums.CommandTypes
import org.hyacinthbots.docgenerator.enums.SupportedFileFormat
import java.util.*
import kotlin.io.path.Path

var updatemessages = JsonArray()

Expand Down Expand Up @@ -109,6 +104,7 @@ suspend fun main() {
i18n {
defaultLocale = Locale.ENGLISH
}
/*
docsGenerator {
enabled = true
fileFormat = SupportedFileFormat.MARKDOWN
Expand All @@ -118,6 +114,7 @@ suspend fun main() {
commandTypes = CommandTypes.ALL
botName = "Allium"
}
*/
}
bot.start()
}

0 comments on commit e6d7484

Please sign in to comment.