Skip to content

Commit 3fa6fce

Browse files
committed
feat(server): print application version at startup
1 parent ef7a61c commit 3fa6fce

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

server/src/main/java/sc/server/Application.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
import java.io.File;
1111
import java.io.IOException;
12+
import java.nio.file.Files;
13+
import java.nio.file.Paths;
14+
import java.util.List;
1215

1316
public final class Application {
1417

@@ -34,6 +37,13 @@ public static void main(String[] params) {
3437
}
3538
logger.info("Server is starting up...");
3639

40+
try {
41+
List<String> version = Files.readAllLines(Paths.get("version"));
42+
logger.info("Running version {}", version);
43+
} catch(IOException ignored) {
44+
logger.debug("Could not determine running version");
45+
}
46+
3747
// register crtl + c
3848
addShutdownHook();
3949
long start = System.currentTimeMillis();

0 commit comments

Comments
 (0)