Ensure that SBT project version and application version are in sync

This commit is contained in:
Jarek Sacha 2023-06-10 09:51:17 -04:00
parent 9a0cb694f7
commit 8a417ceedb
No known key found for this signature in database
GPG key ID: F29625CE62288163
3 changed files with 10 additions and 4 deletions

View file

@ -48,3 +48,8 @@ nativeConfig ~= { c =>
//nativeConfig ~= { c =>
// c.withCompileOptions(c.compileOptions ++ Seq("-v"))
//}
// Version info generation from SBT configuration
enablePlugins(BuildInfoPlugin)
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion)
buildInfoPackage := "ij_plugins.imagej_launcher"

2
project/buildinfo.sbt Normal file
View file

@ -0,0 +1,2 @@
// https://github.com/sbt/sbt-buildinfo
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")

View file

@ -10,10 +10,9 @@ import scopt.OParser
import java.io.File
object Main:
private var logger = new Logger()
private val AppName = "ijp-imagej-launcher"
// private val AppVersion = s"${Version.version} [${Version.buildTimeStr}]"
private val AppVersion = s"0.1.0"
private var logger = new Logger()
private val AppName = "IJP-ImageJ-Launcher"
private val AppVersion = BuildInfo.version
private val VersionMessage = s"v.$AppVersion"
private val AppDescription =
"""Native launcher for ImageJ2