Skip to content

Commit

Permalink
fix: add back in: option to specify keystore file path
Browse files Browse the repository at this point in the history
  • Loading branch information
Sculas committed Jun 22, 2022
1 parent bfd50a4 commit c94471f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/main/kotlin/app/revanced/cli/command/MainCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -108,8 +112,13 @@ internal object MainCommand : Runnable {
Signing.start(
patchedFile,
outputFile,
args.cn,
args.password,
SigningOptions(
args.cn,
args.password,
args.keystorePath ?: outputFile.parentFile
.resolve("${outputFile.nameWithoutExtension}.keystore")
.name
)
)
}

Expand Down

0 comments on commit c94471f

Please sign in to comment.