mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
leave non-numeric qualifiers in place for version (#439)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
parent
d7b8f1eaa9
commit
b51bf275b9
@ -38,9 +38,12 @@ public class OpenHAB {
|
||||
*/
|
||||
static public String getVersion() {
|
||||
String versionString = FrameworkUtil.getBundle(OpenHAB.class).getVersion().toString();
|
||||
// if the version string contains a qualifier, remove it!
|
||||
// if the version string contains a "snapshot" qualifier, remove it!
|
||||
if (StringUtils.countMatches(versionString, ".") == 3) {
|
||||
versionString = StringUtils.substringBeforeLast(versionString, ".");
|
||||
String qualifier = StringUtils.substringAfterLast(versionString, ".");
|
||||
if (StringUtils.isNumeric(qualifier) || qualifier.equals("qualifier")) {
|
||||
versionString = StringUtils.substringBeforeLast(versionString, ".");
|
||||
}
|
||||
}
|
||||
return versionString;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user