Update options.json handling
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,12 +1,18 @@
|
||||
FROM ubuntu
|
||||
|
||||
RUN apt-get update && apt-get install -y git jq openjdk-17-jdk zip wget
|
||||
RUN apt-get update && apt-get install -y gettext-base git jq openjdk-17-jdk zip wget
|
||||
RUN git clone --recurse https://github.com/revanced-apks/build-apps.git /app
|
||||
|
||||
WORKDIR /app
|
||||
RUN sed -i 's/--keystore=ks\.keystore/--keystore=ks\.keystore --options=build\/.options.json/' utils.sh
|
||||
RUN sed -i 's/$(nproc)/2/g' build.sh
|
||||
COPY config.toml config.toml
|
||||
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
|
||||
|
@@ -8,9 +8,10 @@ docker run -v $(pwd)/build:/app/build -e GITHUB_TOKEN=YOUR_GITHUB_TOKEN registry
|
||||
|
||||
## Environment Variables
|
||||
|
||||
| Environment Variable | Description |
|
||||
| -------------------- | -------------------------------------------- |
|
||||
| `GITHUB_TOKEN` | Github token to use for downloading patches. |
|
||||
| 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
|
||||
|
||||
|
@@ -34,7 +34,6 @@ arch = "arm64-v8a"
|
||||
apkmirror-dlurl = "https://www.apkmirror.com/apk/redditinc/reddit/"
|
||||
|
||||
[Sync]
|
||||
app-name = ".sync"
|
||||
apkmirror-dlurl = "https://www.apkmirror.com/apk/red-apps-ltd/sync-for-reddit/"
|
||||
|
||||
[Spotify]
|
||||
|
11
options.json
Normal file
11
options.json
Normal file
@@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
"patchName": "change-oauth-client-id",
|
||||
"options": [
|
||||
{
|
||||
"key": "client-id",
|
||||
"value": "$REDDIT_OAUTH_CLIENT_ID"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
Reference in New Issue
Block a user