diff --git a/build.gradle.kts b/build.gradle.kts index 7650f84..d0927fa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 { diff --git a/src/main/kotlin/org/hyacinthbots/allium/App.kt b/src/main/kotlin/org/hyacinthbots/allium/App.kt index 0c0fc96..32a47eb 100644 --- a/src/main/kotlin/org/hyacinthbots/allium/App.kt +++ b/src/main/kotlin/org/hyacinthbots/allium/App.kt @@ -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() @@ -109,6 +104,7 @@ suspend fun main() { i18n { defaultLocale = Locale.ENGLISH } + /* docsGenerator { enabled = true fileFormat = SupportedFileFormat.MARKDOWN @@ -118,6 +114,7 @@ suspend fun main() { commandTypes = CommandTypes.ALL botName = "Allium" } + */ } bot.start() }