Added build number to version readout.
This commit is contained in:
parent
713c0f068a
commit
4bbcbcf290
4
.gitignore
vendored
4
.gitignore
vendored
@ -3,3 +3,7 @@
|
||||
/priestessconfig.txtbkup
|
||||
/target/
|
||||
dependency-reduced-pom.xml
|
||||
buildNumber.properties
|
||||
.classpath
|
||||
.project
|
||||
.settings/
|
||||
|
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
<groupId>com.tinyplantnews.priestess</groupId>
|
||||
<artifactId>Priestess</artifactId>
|
||||
<name>Priestesss of the Bean Goose Cult</name>
|
||||
<version>0.1</version>
|
||||
<version>0.2</version>
|
||||
<packaging>jar</packaging>
|
||||
<scm>
|
||||
<connection>scm:git:https://tinyplantnews.com/git/Priestess.git</connection>
|
||||
|
@ -209,7 +209,7 @@ public class Configuration {
|
||||
private static Properties getJarProperties() {
|
||||
Properties props = new Properties();
|
||||
try {
|
||||
props.load(Configuration.class.getClassLoader().getResourceAsStream("version/version.properties"));
|
||||
props.load(Configuration.class.getClassLoader().getResourceAsStream("version.properties"));
|
||||
} catch (IOException e) {
|
||||
log.log(Level.SEVERE, "Problem encountered while loading basic jar properties: {0}", e);
|
||||
return null;
|
||||
@ -219,15 +219,18 @@ public class Configuration {
|
||||
|
||||
public static final String PROGNAME;
|
||||
public static final String VERSION;
|
||||
public static final String BUILD;
|
||||
|
||||
static {
|
||||
Properties props = getJarProperties();
|
||||
if (props == null) {
|
||||
PROGNAME = "Priestess, probably";
|
||||
VERSION = "(version unknown)";
|
||||
BUILD = "(unknown build number)";
|
||||
} else {
|
||||
PROGNAME = props.getProperty("progname");
|
||||
VERSION = props.getProperty("version");
|
||||
BUILD = props.getProperty("build");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,7 @@ import org.reactivestreams.Publisher;
|
||||
import reactor.core.publisher.Mono;
|
||||
import static com.tinyplantnews.priestess.Configuration.PROGNAME;
|
||||
import static com.tinyplantnews.priestess.Configuration.VERSION;
|
||||
import static com.tinyplantnews.priestess.Configuration.BUILD;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -863,7 +864,7 @@ public class Priestess {
|
||||
public final Callback listCommandsCommand = new Callback() {
|
||||
@Override
|
||||
public Publisher<Mono> apply(CommandArgs o) {
|
||||
o.replyWith(PROGNAME + " " + VERSION);
|
||||
o.replyWith(PROGNAME + " " + VERSION + " build number " + BUILD);
|
||||
for (String name : Command.commands.keySet()) {
|
||||
o.replyWith(" Help for command " + name + ": " + Command.commands.get(name).getHelp());
|
||||
}
|
||||
|
@ -0,0 +1,3 @@
|
||||
progname=${name}
|
||||
version=${version}
|
||||
build=${buildNumber}
|
Loading…
Reference in New Issue
Block a user