mirror of
https://github.com/corda/corda.git
synced 2024-12-21 22:07:55 +00:00
Fix in reading non-present manifest values in single tests
This commit is contained in:
parent
31dc6e4b8f
commit
bbbc4d9eaa
@ -38,15 +38,14 @@ fun main(args: Array<String>) {
|
|||||||
val startTime = System.currentTimeMillis()
|
val startTime = System.currentTimeMillis()
|
||||||
checkJavaVersion()
|
checkJavaVersion()
|
||||||
|
|
||||||
val nodeVersionInfo = if (Manifests.exists("Corda-Version")) {
|
// Manifest properties are only available if running from the corda jar
|
||||||
NodeVersionInfo(
|
fun manifestValue(name: String): String? = if (Manifests.exists(name)) Manifests.read(name) else null
|
||||||
Version.parse(Manifests.read("Corda-Version")),
|
|
||||||
Manifests.read("Corda-Revision"),
|
val nodeVersionInfo = NodeVersionInfo(
|
||||||
Manifests.read("Corda-Vendor"))
|
manifestValue("Corda-Version")?.let { Version.parse(it) } ?: Version(0, 0, false),
|
||||||
} else {
|
manifestValue("Corda-Revision") ?: "Unknown",
|
||||||
// If the manifest properties aren't available then we're running from within an IDE
|
manifestValue("Corda-Vendor") ?: "Unknown"
|
||||||
NodeVersionInfo(Version(0, 0, false), "~Git revision unavailable~", "Unknown vendor")
|
)
|
||||||
}
|
|
||||||
|
|
||||||
val argsParser = ArgsParser()
|
val argsParser = ArgsParser()
|
||||||
|
|
||||||
@ -197,7 +196,7 @@ private fun drawBanner(nodeVersionInfo: NodeVersionInfo) {
|
|||||||
/ / __ / ___/ __ / __ `/ """).fgBrightBlue().a(msg1).newline().fgBrightRed().a(
|
/ / __ / ___/ __ / __ `/ """).fgBrightBlue().a(msg1).newline().fgBrightRed().a(
|
||||||
"/ /___ /_/ / / / /_/ / /_/ / ").fgBrightBlue().a(msg2).newline().fgBrightRed().a(
|
"/ /___ /_/ / / / /_/ / /_/ / ").fgBrightBlue().a(msg2).newline().fgBrightRed().a(
|
||||||
"""\____/ /_/ \__,_/\__,_/""").reset().newline().newline().fgBrightDefault().bold().
|
"""\____/ /_/ \__,_/\__,_/""").reset().newline().newline().fgBrightDefault().bold().
|
||||||
a("--- ${nodeVersionInfo.vendor} ${nodeVersionInfo.version} (${nodeVersionInfo.revision.take(6)}) -----------------------------------------------").
|
a("--- ${nodeVersionInfo.vendor} ${nodeVersionInfo.version} (${nodeVersionInfo.revision.take(7)}) -----------------------------------------------").
|
||||||
newline().
|
newline().
|
||||||
newline().
|
newline().
|
||||||
a("${Emoji.books}New! ").reset().a("Training now available worldwide, see https://corda.net/corda-training/").
|
a("${Emoji.books}New! ").reset().a("Training now available worldwide, see https://corda.net/corda-training/").
|
||||||
|
Loading…
Reference in New Issue
Block a user