Improve options handling
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
build/
|
||||
out/
|
||||
options.private.json
|
||||
|
@@ -1,6 +1,6 @@
|
||||
FROM ubuntu
|
||||
|
||||
RUN apt-get update && apt-get install -y gettext-base git jq openjdk-17-jdk zip wget
|
||||
RUN apt-get update && apt-get install -y git jq openjdk-17-jdk zip wget
|
||||
RUN git clone --recurse https://github.com/revanced-apks/build-apps.git /app
|
||||
|
||||
WORKDIR /app
|
||||
@@ -9,10 +9,6 @@ COPY options.json options.json
|
||||
|
||||
RUN sed -i 's/--keystore=ks\.keystore/--keystore=ks\.keystore --options=options.json/' utils.sh
|
||||
RUN sed -i 's/$(nproc)/2/g' build.sh
|
||||
RUN sed -i 's/patch_apk() {/patch_apk() {\n envsubst < options.json > options.json.tmp\n mv options.json.tmp options.json/' utils.sh
|
||||
|
||||
ENV GITHUB_TOKEN=
|
||||
ENV REDDIT_OAUTH_CLIENT_ID=
|
||||
|
||||
RUN groupadd -g 1000 revanced
|
||||
RUN useradd -u 1000 -g revanced revanced
|
||||
|
@@ -3,6 +3,7 @@
|
||||
A Docker container that will help you build Revanced apps. Based on [revanced-apks/build-apps](https://github.com/revanced-apks/build-apps).
|
||||
|
||||
```shell
|
||||
docker build . -t registry.karaolidis.com/nikas36/revanced-builder:latest
|
||||
docker run -v $(pwd)/build:/app/build -e GITHUB_TOKEN=YOUR_GITHUB_TOKEN registry.karaolidis.com/nikas36/revanced-builder:latest
|
||||
```
|
||||
|
||||
@@ -11,7 +12,6 @@ docker run -v $(pwd)/build:/app/build -e GITHUB_TOKEN=YOUR_GITHUB_TOKEN registry
|
||||
| Environment Variable | Description |
|
||||
| ------------------------ | ---------------------------------------------------------- |
|
||||
| `GITHUB_TOKEN` | Github token to use for downloading patches. |
|
||||
| `REDDIT_OAUTH_CLIENT_ID` | Reddit OAuth Client ID for "change-oauth-client-id" patch. |
|
||||
|
||||
## Volumes
|
||||
|
||||
|
12
options.json
12
options.json
@@ -1,11 +1 @@
|
||||
[
|
||||
{
|
||||
"patchName": "change-oauth-client-id",
|
||||
"options": [
|
||||
{
|
||||
"key": "client-id",
|
||||
"value": "$REDDIT_OAUTH_CLIENT_ID"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
[]
|
||||
|
Reference in New Issue
Block a user