Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f40dcafb43 | |||
| d9cb54b285 | |||
| f738a162d3 |
@@ -23,7 +23,7 @@ Note that the issue will be automatically closed if you do not fill out the titl
|
|||||||
---
|
---
|
||||||
|
|
||||||
## Device information
|
## Device information
|
||||||
- Suwayomi-Server version: (Example: v1.1.0-r1532-win32)
|
- Suwayomi-Server version: (Example: v1.1.1-r1535-win32)
|
||||||
- Server Operating System: (Example: Ubuntu 20.04)
|
- Server Operating System: (Example: Ubuntu 20.04)
|
||||||
- Server Desktop Environment: N/A or (Example: Gnome 40)
|
- Server Desktop Environment: N/A or (Example: Gnome 40)
|
||||||
- Server JVM version: bundled with win32 or (Example: Java 8 Update 281 or OpenJDK 8u281)
|
- Server JVM version: bundled with win32 or (Example: Java 8 Update 281 or OpenJDK 8u281)
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
# Server: v1.1.1 + WevUI: v1.1.0
|
||||||
|
## TL;DR
|
||||||
|
- WebUI update bugfixes
|
||||||
|
|
||||||
|
## Suwayomi-Server Changelog
|
||||||
|
- ([r1534](https://github.com/Suwayomi/Suwayomi-Server/commit/d9cb54b28593e4df87522090f03a6e5b9c7d9fa2)) Compare webUI version with bundled webUI version ([#969](https://github.com/Suwayomi/Suwayomi-Server/pull/969) by @schroda)
|
||||||
|
- ([r1533](https://github.com/Suwayomi/Suwayomi-Server/commit/f738a162d3cd4582612d4986b3d3887e1c309bdd)) Support for "STABLEPREVIEW" webUI version ([#970](https://github.com/Suwayomi/Suwayomi-Server/pull/970) by @schroda)
|
||||||
|
|
||||||
# Server: v1.1.0 + WevUI: v1.1.0
|
# Server: v1.1.0 + WevUI: v1.1.0
|
||||||
## TL;DR
|
## TL;DR
|
||||||
- Update Manga Info in browse
|
- Update Manga Info in browse
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import java.io.BufferedReader
|
|||||||
const val MainClass = "suwayomi.tachidesk.MainKt"
|
const val MainClass = "suwayomi.tachidesk.MainKt"
|
||||||
|
|
||||||
// should be bumped with each stable release
|
// should be bumped with each stable release
|
||||||
val tachideskVersion = System.getenv("ProductVersion") ?: "v1.1.0"
|
val tachideskVersion = System.getenv("ProductVersion") ?: "v1.1.1"
|
||||||
|
|
||||||
val webUIRevisionTag = System.getenv("WebUIRevision") ?: "r1689"
|
val webUIRevisionTag = System.getenv("WebUIRevision") ?: "r1689"
|
||||||
|
|
||||||
|
|||||||
@@ -136,6 +136,8 @@ enum class WebUIFlavor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun WebUIFlavor.isDefault(): Boolean = this == WebUIFlavor.default
|
||||||
|
|
||||||
object WebInterfaceManager {
|
object WebInterfaceManager {
|
||||||
private val logger = KotlinLogging.logger {}
|
private val logger = KotlinLogging.logger {}
|
||||||
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Default)
|
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.Default)
|
||||||
@@ -314,10 +316,7 @@ object WebInterfaceManager {
|
|||||||
// check if the bundled webUI version is a newer version than the current used version
|
// check if the bundled webUI version is a newer version than the current used version
|
||||||
// this could be the case in case no compatible webUI version is available and a newer server version was installed
|
// this could be the case in case no compatible webUI version is available and a newer server version was installed
|
||||||
val shouldUpdateToBundledVersion =
|
val shouldUpdateToBundledVersion =
|
||||||
flavor.uiName == WebUIFlavor.default.uiName && extractVersion(getLocalVersion()) <
|
flavor.isDefault() && extractVersion(getLocalVersion()) < extractVersion(BuildConfig.WEBUI_TAG)
|
||||||
extractVersion(
|
|
||||||
BuildConfig.WEBUI_TAG,
|
|
||||||
)
|
|
||||||
if (shouldUpdateToBundledVersion) {
|
if (shouldUpdateToBundledVersion) {
|
||||||
log.debug { "update to bundled version \"${BuildConfig.WEBUI_TAG}\"" }
|
log.debug { "update to bundled version \"${BuildConfig.WEBUI_TAG}\"" }
|
||||||
|
|
||||||
@@ -375,7 +374,7 @@ object WebInterfaceManager {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flavor.uiName != WebUIFlavor.default.uiName) {
|
if (!flavor.isDefault()) {
|
||||||
log.warn { "fallback to default webUI \"${WebUIFlavor.default.uiName}\"" }
|
log.warn { "fallback to default webUI \"${WebUIFlavor.default.uiName}\"" }
|
||||||
|
|
||||||
serverConfig.webUIFlavor.value = WebUIFlavor.default.uiName
|
serverConfig.webUIFlavor.value = WebUIFlavor.default.uiName
|
||||||
@@ -597,24 +596,25 @@ object WebInterfaceManager {
|
|||||||
?: throw Exception("Invalid mappingFile")
|
?: throw Exception("Invalid mappingFile")
|
||||||
val minServerVersionNumber = extractVersion(minServerVersionString)
|
val minServerVersionNumber = extractVersion(minServerVersionString)
|
||||||
|
|
||||||
|
// is a STABLE webUI release, without a specified webUI version, which requires same handling as the PREVIEW release
|
||||||
|
val isUnknownStableVersion = webUIVersion == "STABLEPREVIEW"
|
||||||
|
|
||||||
if (!WebUIChannel.doesConfigChannelEqual(WebUIChannel.from(webUIVersion))) {
|
if (!WebUIChannel.doesConfigChannelEqual(WebUIChannel.from(webUIVersion))) {
|
||||||
// allow only STABLE versions for STABLE channel
|
// allow only STABLE versions for STABLE channel
|
||||||
if (WebUIChannel.doesConfigChannelEqual(WebUIChannel.STABLE)) {
|
if (WebUIChannel.doesConfigChannelEqual(WebUIChannel.STABLE) && !isUnknownStableVersion) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow all versions for PREVIEW channel
|
// allow all versions for PREVIEW channel
|
||||||
}
|
}
|
||||||
|
|
||||||
if (webUIVersion == WebUIChannel.PREVIEW.name) {
|
if (webUIVersion == WebUIChannel.PREVIEW.name || isUnknownStableVersion) {
|
||||||
webUIVersion = fetchPreviewVersion(flavor)
|
webUIVersion = fetchPreviewVersion(flavor)
|
||||||
}
|
}
|
||||||
|
|
||||||
val isCompatibleVersion =
|
val isNewerThanBundled =
|
||||||
minServerVersionNumber <= currentServerVersionNumber && minServerVersionNumber >=
|
!flavor.isDefault() || extractVersion(webUIVersion) >= extractVersion(BuildConfig.WEBUI_TAG)
|
||||||
extractVersion(
|
val isCompatibleVersion = minServerVersionNumber <= currentServerVersionNumber && isNewerThanBundled
|
||||||
BuildConfig.WEBUI_TAG,
|
|
||||||
)
|
|
||||||
if (isCompatibleVersion) {
|
if (isCompatibleVersion) {
|
||||||
return webUIVersion
|
return webUIVersion
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user