Skip to content

Commit

Permalink
Actually hook up the version
Browse files Browse the repository at this point in the history
  • Loading branch information
me4502 committed Aug 12, 2019
1 parent 9a8cd85 commit d2ce273
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion worldedit-cli/build.gradle.kts
Expand Up @@ -13,7 +13,7 @@ dependencies {
tasks.named<Jar>("jar") {
manifest {
attributes(
"WorldEdit-Version" to project.version,
"Implementation-Version" to project.version,
"Main-Class" to "com.sk89q.worldedit.cli.CLIWorldEdit"
)
}
Expand Down
Expand Up @@ -56,11 +56,14 @@
import java.io.InputStream;
import java.io.SequenceInputStream;
import java.io.UncheckedIOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.util.Map;
import java.util.Scanner;
import java.util.jar.Manifest;

/**
* The CLI implementation of WorldEdit.
Expand All @@ -74,6 +77,7 @@ public class CLIWorldEdit {
private CLIPlatform platform;
private CLIConfiguration config;
private Path workingDir;
private String version;

private Actor commandSender;

Expand Down Expand Up @@ -220,7 +224,10 @@ public File getWorkingDir() {
* @return a version string
*/
String getInternalVersion() {
return ":shrug:";
if (version == null) {
version = getClass().getPackage().getImplementationVersion();
}
return version;
}

public void run(InputStream inputStream) {
Expand Down

0 comments on commit d2ce273

Please sign in to comment.