Skip to content

Commit

Permalink
Server versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
MrStahlfelge committed Jan 10, 2021
1 parent 713700c commit d25676b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ make it more difficult for you. I didn't plan to open the source from the beginn
write notes for myself in my native tongue.

## Server
Deploy to Heroku or dokku with
To set up a multiplayer server with a vserver, you can deploy to Heroku or dokku with

git subtree push --prefix server remotename master
git subtree push --prefix server remotename master

For local play or other setups, you can build a jar file with

gradlew server:build

OpenJDK8 for building and using recommended.
2 changes: 1 addition & 1 deletion server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ task run(dependsOn: classes, type: JavaExec) {
task stage(dependsOn: ['build', 'clean'])
build.mustRunAfter clean
jar {
archiveBaseName = "server"
archiveFileName.set("server.jar")
manifest {
attributes 'Main-Class': mainClassNameServer
}
Expand Down
2 changes: 1 addition & 1 deletion server/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import de.golfgl.lightblocks.server.model.ServerInfo;

public class LightblocksServer extends WebSocketServer implements ApplicationListener {
public static final int SERVER_VERSION = 1; // reported to the clients, don't mess with it
public static final int SERVER_VERSION = 2102; // reported to the clients, don't mess with it

final ServerConfiguration serverConfig;
final Serializer serializer = new Serializer();
Expand Down Expand Up @@ -131,6 +131,8 @@ public void onStart() {
Gdx.app.error("Server", "Could not register for service discovery.", e);
}
}

Gdx.app.log("Server", "Server version: " + SERVER_VERSION);
}

@Override
Expand Down

0 comments on commit d25676b

Please sign in to comment.