mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 16:27:11 -07:00
Updated core submodule. Use RIFE core method to read version number.
This commit is contained in:
parent
ddf31fd1a5
commit
cb59f12427
3 changed files with 3 additions and 25 deletions
|
@ -6,8 +6,6 @@ package rife.bld;
|
|||
|
||||
import rife.tools.FileUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Singleton class that provides access to the current bld version as a string.
|
||||
*
|
||||
|
@ -15,30 +13,10 @@ import java.io.IOException;
|
|||
* @since 1.7
|
||||
*/
|
||||
public class BldVersion {
|
||||
private String version_;
|
||||
private final String version_;
|
||||
|
||||
BldVersion() {
|
||||
var resource = getClass().getClassLoader().getResource("BLD_VERSION");
|
||||
try {
|
||||
if (resource == null) {
|
||||
version_ = null;
|
||||
} else {
|
||||
var connection = resource.openConnection();
|
||||
connection.setUseCaches(false);
|
||||
try (var input_stream = connection.getInputStream()) {
|
||||
version_ = FileUtils.readString(input_stream);
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
version_ = null;
|
||||
}
|
||||
|
||||
if (version_ != null) {
|
||||
version_ = version_.trim();
|
||||
}
|
||||
if (null == version_) {
|
||||
version_ = "unknown version";
|
||||
}
|
||||
version_ = FileUtils.versionFromResource("BLD_VERSION");
|
||||
}
|
||||
|
||||
private String getVersionString() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue