Skip to content

Commit 1ef92ae

Browse files
Update documentation, adjust logging output
1 parent a48af1a commit 1ef92ae

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

docs/1_usage.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,22 @@ java -jar morphe-cli.jar patch --patches patches.mpp -i "Patch name" -Okey1 inpu
9898

9999
## 📃 Patch option json
100100

101-
Generate a template patch options file:
101+
Generate a template patch options file, or update your existing file (remove invalid json, add missing json):
102102
```bash
103-
java -jar morphe-cli.jar options --patches patches.mpp options-create --out options.json
103+
java -jar morphe-cli.jar options-create --patches patches.mpp --out options.json
104104
```
105105

106106
After modifying the json file to include/exclude patches or set any patch options, use the file with `--options-file`:
107107
```bash
108108
java -jar morphe-cli.jar patch --patches patches.mpp --options-file options.json input.apk
109109
```
110110

111+
To patch with an options.json and update the json (same functionality as `options-create` above),
112+
then add parameter `--options-update`:
113+
```bash
114+
java -jar morphe-cli.jar patch --patches patches.mpp --options-file options.json --options-update input.apk
115+
```
116+
111117

112118
## 📃 List patches
113119

src/main/kotlin/app/morphe/cli/command/OptionsCommand.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ internal object OptionsCommand : Callable<Int> {
101101
val removed = existingNames - newNames
102102
val kept = newNames.intersect(existingNames)
103103
logger.info("Updated bundle in options file at ${outputFile.path}")
104-
logger.info(" ${kept.size} patch(es) preserved, ${added.size} added, ${removed.size} removed")
104+
logger.info(" ${kept.size} patches preserved, ${added.size} added, ${removed.size} removed")
105105
} else {
106106
logger.info("Created new bundle in options file at ${outputFile.path} with ${updatedBundle.patches.size} patches")
107107
}

src/main/kotlin/app/morphe/cli/command/PatchCommand.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,15 @@ internal object PatchCommand : Callable<Int> {
473473
if (newPatches.isNotEmpty() || removedPatches.isNotEmpty() || patchesWithNewOptions > 0) {
474474
logger.warning("Your options file is out of date with the current patches:")
475475
if (newPatches.isNotEmpty()) {
476-
logger.warning(" ${newPatches.size} new patch(es) not in your options file (will use defaults)")
476+
logger.warning(" ${newPatches.size} new patches not in your options file, default patch values will be applied")
477477
}
478478
if (removedPatches.isNotEmpty()) {
479-
logger.warning(" ${removedPatches.size} patch(es) in your options file no longer exist (will be ignored)")
479+
logger.warning(" ${removedPatches.size} patches in your options file no longer exist and will be ignored")
480480
}
481481
if (patchesWithNewOptions > 0) {
482-
logger.warning(" $patchesWithNewOptions patch(es) have new options not in your file (will use defaults)")
482+
logger.warning(" $patchesWithNewOptions patches have new options not in your file, default patch values will be applied")
483483
}
484-
logger.warning(" Run with --options-update to sync, or use 'options-create' to regenerate.")
484+
logger.warning(" Use --options-update parameter to sync, or use 'options-create' command to regenerate.")
485485
}
486486
}
487487

0 commit comments

Comments
 (0)