Class BuildVersion
java.lang.Object
com.apple.foundationdb.relational.util.BuildVersion
Hosts the content of the version.properties file written by the build
into a generated file 'versions.properties' in the fdb-relational-api module.
Contents of file look like this:
# Generated by fdb-relational-api build.
name=fdb-relational-layer
version=22.10.10.7be747b-SNAPSHOT
gitHash=7be747b148b5089c4bf57cf3c87513a1ee1b1e2e
branch=api
url='https://github.com/FoundationDB/fdb-record-layer/'
user=stack
buildtime=2022-10-11T04:59:47.480946Z
Below are accessors for the content and some utility methods to get
major or minor parts of version string.
Obtain the singleton instance by calling
getInstance()
}-
Method Summary
Modifier and TypeMethodDescriptionstatic BuildVersion
int
Utility for returning major part ofgetVersion()
: e.g.int
getMajorVersion
(String version) Utility for finding major part of passed version.int
Utility for returning minor part ofgetVersion()
: e.g.int
getMinorVersion
(String version) Utility for finding minor part of passed version.getURL()
-
Method Details
-
getInstance
-
getURL
-
getVersion
-
getMajorVersion
Utility for returning major part ofgetVersion()
: e.g. if version is 1.2.3, this method will return '1'.- Returns:
- major version.
- Throws:
RelationalException
-
getMajorVersion
Utility for finding major part of passed version.- Parameters:
version
- full version- Returns:
- major sub-version.
- Throws:
RelationalException
-
getMinorVersion
Utility for returning minor part ofgetVersion()
: e.g. if version is 1.2.3, this method will return '2'.- Returns:
- minor version.
- Throws:
RelationalException
-
getMinorVersion
Utility for finding minor part of passed version.- Parameters:
version
- full version- Returns:
- minor sub-version.
- Throws:
RelationalException
-