mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -04:00
debug option: force check updates
This commit is contained in:
parent
611c244ffc
commit
8b0eac80a5
@ -29,4 +29,6 @@ object DebugOptions {
|
||||
const val EMPTY_BUFFERS = false
|
||||
|
||||
const val FORCE_CHECK_UPDATES = false
|
||||
|
||||
// Add a test to ensure that all options are disabled!!!
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
package de.bixilon.minosoft.properties
|
||||
|
||||
import de.bixilon.minosoft.config.DebugOptions
|
||||
import de.bixilon.minosoft.properties.general.GeneralP
|
||||
import de.bixilon.minosoft.properties.git.GitP
|
||||
|
||||
@ -22,6 +23,7 @@ data class MinosoftP(
|
||||
) {
|
||||
|
||||
fun canUpdate(): Boolean {
|
||||
if (DebugOptions.FORCE_CHECK_UPDATES) return true
|
||||
val properties = MinosoftProperties
|
||||
if (properties.git != null && (properties.git.dirty || properties.git.branch != "master")) {
|
||||
// clearly self built, not checking for updates
|
||||
|
@ -29,5 +29,6 @@ class DebugOptionsTest {
|
||||
assertFalse(DebugOptions.LIGHT_DEBUG_MODE)
|
||||
assertFalse(DebugOptions.FORCE_CHEST_ANIMATION)
|
||||
assertFalse(DebugOptions.EMPTY_BUFFERS)
|
||||
assertFalse(DebugOptions.FORCE_CHECK_UPDATES)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user