Skip to content

Commit

Permalink
Print verifier version being run on CLI startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Patrikeev authored and Sergey Patrikeev committed Apr 17, 2020
1 parent 7948498 commit 841911c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion intellij-plugin-verifier/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ configure(childProjects.values()) {

jar {
manifest {
attributes 'Verifier-Version': version
attributes 'Verifier-Version': projectVersion
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import org.apache.commons.io.FileUtils
import java.net.URL
import java.nio.file.Path
import java.nio.file.Paths
import java.util.*
import kotlin.system.exitProcess

/**
Expand All @@ -44,6 +45,13 @@ object PluginVerifierMain {
CheckPluginApiRunner()
)

private val pluginVerifierVersion: String by lazy {
val manifestUrl = PluginVerifierMain::class.java.getResource("/META-INF/MANIFEST.MF")
val properties = Properties()
properties.load(manifestUrl.openStream())
properties.getProperty("Verifier-Version")
}

private val verifierHomeDirectory: Path by lazy {
val verifierHomeDir = System.getProperty("plugin.verifier.home.dir")
if (verifierHomeDir != null) {
Expand Down Expand Up @@ -75,6 +83,7 @@ object PluginVerifierMain {

@JvmStatic
fun main(args: Array<String>) {
println("Starting the IntelliJ Plugin Verifier $pluginVerifierVersion")
val opts = CmdOpts()
var freeArgs = Args.parse(opts, args, false)

Expand Down

0 comments on commit 841911c

Please sign in to comment.