forked from mirror/BlueMap
Push BlueMapVue and add version to index.html on web-app creation
This commit is contained in:
parent
d64353bf31
commit
9afcb33790
@ -1 +1 @@
|
||||
Subproject commit 0dc79bb9ad37188c9a1d220c3902f9da7d25594c
|
||||
Subproject commit 65841378855748c78ebe927e8002cd18c96df7ac
|
@ -173,7 +173,11 @@ private synchronized void loadWorldsAndMaps() throws InterruptedException {
|
||||
try {
|
||||
loadMapConfig(entry.getKey(), entry.getValue());
|
||||
} catch (ConfigurationException ex) {
|
||||
Logger.global.logError(ex);
|
||||
Logger.global.logWarning(ex.getFormattedExplanation());
|
||||
Throwable cause = ex.getRootCause();
|
||||
if (cause != null) {
|
||||
Logger.global.logError("Detailed error:", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
import com.google.gson.GsonBuilder;
|
||||
import de.bluecolored.bluemap.common.config.WebappConfig;
|
||||
import de.bluecolored.bluemap.core.BlueMap;
|
||||
import de.bluecolored.bluemap.core.logger.Logger;
|
||||
import de.bluecolored.bluemap.core.resources.adapter.ResourcesGson;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
@ -115,6 +116,13 @@ public void updateFiles() throws IOException {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set version in index.html
|
||||
Path indexFile = webRoot.resolve("index.html");
|
||||
String indexContent = Files.readString(indexFile);
|
||||
indexContent = indexContent.replace("%version%", BlueMap.VERSION);
|
||||
Files.writeString(indexFile, indexContent);
|
||||
|
||||
} finally {
|
||||
if (!tempFile.delete()) {
|
||||
Logger.global.logWarning("Failed to delete file: " + tempFile);
|
||||
@ -125,6 +133,8 @@ public void updateFiles() throws IOException {
|
||||
@SuppressWarnings("all")
|
||||
private static class Settings {
|
||||
|
||||
private String version = BlueMap.VERSION;
|
||||
|
||||
private boolean useCookies = true;
|
||||
|
||||
private boolean enableFreeFlight = true;
|
||||
|
Loading…
Reference in New Issue
Block a user