au.csiro.pbdava.ssparkle.common.utils.VersionInfo.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of variant-spark_2.11 Show documentation
Show all versions of variant-spark_2.11 Show documentation
Genomic variants interpretation toolkit
The newest version!
package au.csiro.pbdava.ssparkle.common.utils
import java.util.Properties
import scala.collection.JavaConverters._
object VersionInfo {
lazy val gitProperties: Map[String, String] =
LoanUtils.withCloseable(
getClass.getClassLoader.getResourceAsStream("variant-spark.git.properties")) { in =>
if (in != null) {
val gitProperties = new Properties()
gitProperties.load(in)
gitProperties.asScala.toMap
} else {
throw new IllegalStateException("Cannot find 'variant-spark.git.properties'")
}
}
lazy val version: String = gitProperties.getOrElse("git.build.version",
throw new IllegalStateException("Cannot retrieve version information"))
}