1
mirror of https://github.com/revanced/revanced-patcher synced 2025-09-06 16:38:50 +02:00

Compare commits

..

3 Commits

Author SHA1 Message Date
semantic-release-bot
639ff1c0ba chore(release): 4.2.1 [skip ci]
## [4.2.1](https://github.com/revanced/revanced-patcher/compare/v4.2.0...v4.2.1) (2022-09-08)

### Bug Fixes

* make patcher version public ([76c45dd](76c45dd7c1))
2022-09-08 12:51:09 +00:00
Sculas
f30671ddd1 Merge remote-tracking branch 'origin/main' into main 2022-09-08 14:49:35 +02:00
Sculas
76c45dd7c1 fix: make patcher version public 2022-09-08 14:49:26 +02:00
3 changed files with 15 additions and 4 deletions

View File

@@ -1,3 +1,10 @@
## [4.2.1](https://github.com/revanced/revanced-patcher/compare/v4.2.0...v4.2.1) (2022-09-08)
### Bug Fixes
* make patcher version public ([76c45dd](https://github.com/revanced/revanced-patcher/commit/76c45dd7c1ffdca57e30ae7109c9fe0e5768f877))
# [4.2.0](https://github.com/revanced/revanced-patcher/compare/v4.1.5...v4.2.0) (2022-09-08)

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official
version = 4.2.0
version = 4.2.1

View File

@@ -39,7 +39,6 @@ import java.io.File
import java.nio.file.Files
private val NAMER = BasicDexFileNamer()
private val VERSION = VersionReader.read()
/**
* The ReVanced Patcher.
@@ -51,6 +50,11 @@ class Patcher(private val options: PatcherOptions) {
val data: PatcherData
companion object {
@JvmStatic
val version = VersionReader.read()
}
init {
val extInputFile = ExtFile(options.inputFile)
try {
@@ -249,9 +253,9 @@ class Patcher(private val options: PatcherOptions) {
fun addPatches(patches: Iterable<Class<out Patch<Data>>>) {
for (patch in patches) {
val needsVersion = patch.sincePatcherVersion
if (needsVersion != null && needsVersion > VERSION) {
if (needsVersion != null && needsVersion > version) {
logger.error("Patch '${patch.patchName}' requires Patcher version $needsVersion or higher")
logger.error("Current Patcher version is $VERSION")
logger.error("Current Patcher version is $version")
logger.warn("Skipping '${patch.patchName}'!")
continue // TODO: continue or halt/throw?
}