mirror of
https://github.com/ReVanced/revanced-cli.git
synced 2026-01-15 23:44:00 +00:00
fix: show actual version in CLI
This commit is contained in:
@@ -13,8 +13,16 @@ import picocli.CommandLine.*
|
|||||||
import java.io.File
|
import java.io.File
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
|
|
||||||
|
private class CLIVersionProvider : IVersionProvider {
|
||||||
|
override fun getVersion() = arrayOf(
|
||||||
|
MainCommand::class.java.`package`.implementationVersion ?: "unknown"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
name = "ReVanced-CLI", version = ["1.0.0"], mixinStandardHelpOptions = true
|
name = "ReVanced-CLI",
|
||||||
|
mixinStandardHelpOptions = true,
|
||||||
|
versionProvider = CLIVersionProvider::class
|
||||||
)
|
)
|
||||||
internal object MainCommand : Runnable {
|
internal object MainCommand : Runnable {
|
||||||
@ArgGroup(exclusive = false, multiplicity = "1")
|
@ArgGroup(exclusive = false, multiplicity = "1")
|
||||||
|
|||||||
Reference in New Issue
Block a user