fix: add back in: option to specify keystore file path

This commit is contained in:
Lucaskyy 2022-06-22 14:58:12 +02:00
parent bfd50a43b9
commit c94471f464
No known key found for this signature in database
GPG Key ID: 1530BFF96D1EEB89

View File

@ -2,6 +2,7 @@ package app.revanced.cli.command
import app.revanced.cli.patcher.Patcher
import app.revanced.cli.signing.Signing
import app.revanced.cli.signing.SigningOptions
import app.revanced.patcher.PatcherOptions
import app.revanced.patcher.extensions.PatchExtensions.description
import app.revanced.patcher.extensions.PatchExtensions.patchName
@ -59,6 +60,9 @@ internal object MainCommand : Runnable {
@Option(names = ["--cn"], description = ["Overwrite the default CN for the signed file"])
var cn = "ReVanced"
@Option(names = ["--keystore"], description = ["File path to your keystore"])
var keystorePath: String? = null
@Option(names = ["-p", "--password"], description = ["Overwrite the default password for the signed file"])
var password = "ReVanced"
@ -108,8 +112,13 @@ internal object MainCommand : Runnable {
Signing.start(
patchedFile,
outputFile,
SigningOptions(
args.cn,
args.password,
args.keystorePath ?: outputFile.parentFile
.resolve("${outputFile.nameWithoutExtension}.keystore")
.name
)
)
}