Skip to content

Commit

Permalink
Update to bundled webUI version if necessary (#619)
Browse files Browse the repository at this point in the history
In case on the startup no webUI update was available but the bundled version of the server is newer than the current used version, then the bundled version should be used.

This could be the case in case a new server version was installed and no compatible webUI version is available
  • Loading branch information
schroda authored Jul 30, 2023
1 parent a2715fb commit f0a190e
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ object WebInterfaceManager {
checkForUpdate()
}

// 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
val shouldUpdateToBundledVersion =
serverConfig.webUIFlavor == DEFAULT_WEB_UI && extractVersion(getLocalVersion(applicationDirs.webUIRoot)) < extractVersion(
BuildConfig.WEBUI_TAG
)
if (shouldUpdateToBundledVersion) {
logger.debug { "Update to bundled version \"${BuildConfig.WEBUI_TAG}\"" }
extractBundledWebUI()
}

return
}

Expand Down

0 comments on commit f0a190e

Please sign in to comment.