mirror of
https://github.com/ReVanced/revanced-cli.git
synced 2026-01-11 22:06:20 +00:00
Compare commits
5 Commits
v5.0.2-dev
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
731865e167 | ||
|
|
8e18082862 | ||
|
|
77862e8940 | ||
|
|
f29eda8674 | ||
|
|
bba90fede8 |
2
.github/workflows/build_pull_request.yml
vendored
2
.github/workflows/build_pull_request.yml
vendored
@@ -13,8 +13,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Cache Gradle
|
- name: Cache Gradle
|
||||||
uses: burrunan/gradle-cache-action@v1
|
uses: burrunan/gradle-cache-action@v1
|
||||||
|
|||||||
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
@@ -12,15 +12,12 @@ jobs:
|
|||||||
name: Release
|
name: Release
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
id-token: write
|
||||||
|
attestations: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
# Make sure the release step uses its own credentials:
|
|
||||||
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
|
||||||
persist-credentials: false
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Cache Gradle
|
- name: Cache Gradle
|
||||||
uses: burrunan/gradle-cache-action@v1
|
uses: burrunan/gradle-cache-action@v1
|
||||||
@@ -47,6 +44,14 @@ jobs:
|
|||||||
fingerprint: ${{ vars.GPG_FINGERPRINT }}
|
fingerprint: ${{ vars.GPG_FINGERPRINT }}
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
|
uses: cycjimmy/semantic-release-action@v4
|
||||||
|
id: release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: npm exec semantic-release
|
|
||||||
|
- name: Attest
|
||||||
|
if: steps.release.outputs.new_release_published == 'true'
|
||||||
|
uses: actions/attest-build-provenance@v2
|
||||||
|
with:
|
||||||
|
subject-name: 'ReVanced CLI ${{ steps.release.outputs.new_release_git_tag }}'
|
||||||
|
subject-path: build/libs/revanced-cli*.jar
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
## [5.0.2-dev.2](https://github.com/ReVanced/revanced-cli/compare/v5.0.2-dev.1...v5.0.2-dev.2) (2025-04-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Do not print patch description if null ([bba90fe](https://github.com/ReVanced/revanced-cli/commit/bba90fede85e4632efb9509e5bcf9091a9435549))
|
||||||
|
|
||||||
## [5.0.2-dev.1](https://github.com/ReVanced/revanced-cli/compare/v5.0.1...v5.0.2-dev.1) (2025-04-20)
|
## [5.0.2-dev.1](https://github.com/ReVanced/revanced-cli/compare/v5.0.1...v5.0.2-dev.1) (2025-04-20)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ To build a ReVanced CLI, you can follow the [documentation](/docs).
|
|||||||
|
|
||||||
You can find the documentation of ReVanced CLI [here](/docs).
|
You can find the documentation of ReVanced CLI [here](/docs).
|
||||||
|
|
||||||
## 📜 Licence
|
## 📜 License
|
||||||
|
|
||||||
ReVanced CLI is licensed under the GPLv3 license. Please see the [license file](LICENSE) for more information.
|
ReVanced CLI is licensed under the GPLv3 license. Please see the [license file](LICENSE) for more information.
|
||||||
[tl;dr](https://www.tldrlegal.com/license/gnu-general-public-license-v3-gpl-3) you may copy, distribute and modify ReVanced CLI as long as you track changes/dates in source files.
|
[tl;dr](https://www.tldrlegal.com/license/gnu-general-public-license-v3-gpl-3) you may copy, distribute and modify ReVanced CLI as long as you track changes/dates in source files.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 5.0.2-dev.1
|
version = 5.0.2-dev.2
|
||||||
|
|||||||
@@ -85,58 +85,55 @@ internal object ListPatchesCommand : Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun PatchOption<*>.buildString() =
|
fun PatchOption<*>.buildString() = buildString {
|
||||||
|
appendLine("Title: $title")
|
||||||
|
description?.let { appendLine("Description: $it") }
|
||||||
|
appendLine("Required: $required")
|
||||||
|
default?.let {
|
||||||
|
appendLine("Key: $key")
|
||||||
|
append("Default: $it")
|
||||||
|
} ?: append("Key: $key")
|
||||||
|
|
||||||
|
values?.let { values ->
|
||||||
|
appendLine("\nPossible values:")
|
||||||
|
append(values.map { "${it.value} (${it.key})" }.joinToString("\n").prependIndent("\t"))
|
||||||
|
}
|
||||||
|
|
||||||
|
append("\nType: $type")
|
||||||
|
}
|
||||||
|
|
||||||
|
fun IndexedValue<Patch<*>>.buildString() = let { (index, patch) ->
|
||||||
buildString {
|
buildString {
|
||||||
appendLine("Title: $title")
|
if (withIndex) appendLine("Index: $index")
|
||||||
description?.let { appendLine("Description: $it") }
|
|
||||||
appendLine("Required: $required")
|
|
||||||
default?.let {
|
|
||||||
appendLine("Key: $key")
|
|
||||||
append("Default: $it")
|
|
||||||
} ?: append("Key: $key")
|
|
||||||
|
|
||||||
values?.let { values ->
|
append("Name: ${patch.name}")
|
||||||
appendLine("\nPossible values:")
|
|
||||||
append(values.map { "${it.value} (${it.key})" }.joinToString("\n").prependIndent("\t"))
|
if (withDescriptions) patch.description?.let { append("\nDescription: $it") }
|
||||||
|
|
||||||
|
append("\nEnabled: ${patch.use}")
|
||||||
|
|
||||||
|
if (withOptions && patch.options.isNotEmpty()) {
|
||||||
|
appendLine("\nOptions:")
|
||||||
|
append(
|
||||||
|
patch.options.values.joinToString("\n\n") { option ->
|
||||||
|
option.buildString()
|
||||||
|
}.prependIndent("\t"),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
append("\nType: $type")
|
if (withPackages && patch.compatiblePackages != null) {
|
||||||
}
|
appendLine("\nCompatible packages:")
|
||||||
|
append(
|
||||||
fun IndexedValue<Patch<*>>.buildString() =
|
patch.compatiblePackages!!.joinToString("\n") {
|
||||||
let { (index, patch) ->
|
it.buildString()
|
||||||
buildString {
|
}.prependIndent("\t"),
|
||||||
if (withIndex) appendLine("Index: $index")
|
)
|
||||||
|
|
||||||
append("Name: ${patch.name}")
|
|
||||||
|
|
||||||
if (withDescriptions) append("\nDescription: ${patch.description}")
|
|
||||||
|
|
||||||
append("\nEnabled: ${patch.use}")
|
|
||||||
|
|
||||||
if (withOptions && patch.options.isNotEmpty()) {
|
|
||||||
appendLine("\nOptions:")
|
|
||||||
append(
|
|
||||||
patch.options.values.joinToString("\n\n") { option ->
|
|
||||||
option.buildString()
|
|
||||||
}.prependIndent("\t"),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (withPackages && patch.compatiblePackages != null) {
|
|
||||||
appendLine("\nCompatible packages:")
|
|
||||||
append(
|
|
||||||
patch.compatiblePackages!!.joinToString("\n") {
|
|
||||||
it.buildString()
|
|
||||||
}.prependIndent("\t"),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun Patch<*>.filterCompatiblePackages(name: String) =
|
fun Patch<*>.filterCompatiblePackages(name: String) = compatiblePackages?.any { (compatiblePackageName, _) -> compatiblePackageName == name }
|
||||||
compatiblePackages?.any { (compatiblePackageName, _) -> compatiblePackageName == name }
|
?: withUniversalPatches
|
||||||
?: withUniversalPatches
|
|
||||||
|
|
||||||
val patches = loadPatchesFromJar(patchesFiles).withIndex().toList()
|
val patches = loadPatchesFromJar(patchesFiles).withIndex().toList()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user