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
|
/priestessconfig.txtbkup
|
||||||
/target/
|
/target/
|
||||||
dependency-reduced-pom.xml
|
dependency-reduced-pom.xml
|
||||||
|
buildNumber.properties
|
||||||
|
.classpath
|
||||||
|
.project
|
||||||
|
.settings/
|
||||||
|
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
|||||||
<groupId>com.tinyplantnews.priestess</groupId>
|
<groupId>com.tinyplantnews.priestess</groupId>
|
||||||
<artifactId>Priestess</artifactId>
|
<artifactId>Priestess</artifactId>
|
||||||
<name>Priestesss of the Bean Goose Cult</name>
|
<name>Priestesss of the Bean Goose Cult</name>
|
||||||
<version>0.1</version>
|
<version>0.2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:https://tinyplantnews.com/git/Priestess.git</connection>
|
<connection>scm:git:https://tinyplantnews.com/git/Priestess.git</connection>
|
||||||
|
@ -209,7 +209,7 @@ public class Configuration {
|
|||||||
private static Properties getJarProperties() {
|
private static Properties getJarProperties() {
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
try {
|
try {
|
||||||
props.load(Configuration.class.getClassLoader().getResourceAsStream("version/version.properties"));
|
props.load(Configuration.class.getClassLoader().getResourceAsStream("version.properties"));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.log(Level.SEVERE, "Problem encountered while loading basic jar properties: {0}", e);
|
log.log(Level.SEVERE, "Problem encountered while loading basic jar properties: {0}", e);
|
||||||
return null;
|
return null;
|
||||||
@ -219,15 +219,18 @@ public class Configuration {
|
|||||||
|
|
||||||
public static final String PROGNAME;
|
public static final String PROGNAME;
|
||||||
public static final String VERSION;
|
public static final String VERSION;
|
||||||
|
public static final String BUILD;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Properties props = getJarProperties();
|
Properties props = getJarProperties();
|
||||||
if (props == null) {
|
if (props == null) {
|
||||||
PROGNAME = "Priestess, probably";
|
PROGNAME = "Priestess, probably";
|
||||||
VERSION = "(version unknown)";
|
VERSION = "(version unknown)";
|
||||||
|
BUILD = "(unknown build number)";
|
||||||
} else {
|
} else {
|
||||||
PROGNAME = props.getProperty("progname");
|
PROGNAME = props.getProperty("progname");
|
||||||
VERSION = props.getProperty("version");
|
VERSION = props.getProperty("version");
|
||||||
|
BUILD = props.getProperty("build");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ import org.reactivestreams.Publisher;
|
|||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
import static com.tinyplantnews.priestess.Configuration.PROGNAME;
|
import static com.tinyplantnews.priestess.Configuration.PROGNAME;
|
||||||
import static com.tinyplantnews.priestess.Configuration.VERSION;
|
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() {
|
public final Callback listCommandsCommand = new Callback() {
|
||||||
@Override
|
@Override
|
||||||
public Publisher<Mono> apply(CommandArgs o) {
|
public Publisher<Mono> apply(CommandArgs o) {
|
||||||
o.replyWith(PROGNAME + " " + VERSION);
|
o.replyWith(PROGNAME + " " + VERSION + " build number " + BUILD);
|
||||||
for (String name : Command.commands.keySet()) {
|
for (String name : Command.commands.keySet()) {
|
||||||
o.replyWith(" Help for command " + name + ": " + Command.commands.get(name).getHelp());
|
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