Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

*: the grand rewrite #356

Merged
merged 1 commit into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 0 additions & 15 deletions .eslintrc.cjs

This file was deleted.

14 changes: 14 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true,
"node": true
},
"extends": "eslint:recommended",
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {}
}
12 changes: 5 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,23 @@ jobs:
steps:
- name: Install dependencies
run: |
sudo apt update -y
sudo apt upgrade -y
sudo apt install -y nodejs
sudo apt -y update
sudo apt -y upgrade
sudo apt -y install nodejs
sudo curl -Lo /usr/bin/ldid https://github.com/ProcursusTeam/ldid/releases/download/v2.1.5-procursus2/ldid_linux_x86_64
sudo chmod a+rwx /usr/bin/ldid
- name: Clone repo
uses: actions/checkout@v3
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Install npm dependencies
run: |
npm install --production
run: npm install --production
- name: Install pkg
run: sudo npm install -g pkg
- name: Build
run: pkg -t linux-x64,macos-x64,win-x64 -C GZip --out-path dist .
- name: Upload to Releases
uses: softprops/action-gh-release@v1
with:
files: |
dist/*
files: dist/*
tag_name: ${{ env.RELEASE_VERSION }}
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:18-buster
FROM node:lts-buster

WORKDIR /app

RUN apt-get --yes update && \
apt-get --yes install wget java-common libasound2 libxi6 libxtst6 && \
RUN apt-get update && \
apt-get -y install wget java-common libasound2 libxi6 libxtst6 && \
wget -O /app/zulu.deb https://cdn.azul.com/zulu/bin/zulu17.34.19-ca-jdk17.0.3-linux_amd64.deb && \
yes | dpkg -i /app/zulu.deb && \
rm /app/zulu.deb && \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This project will allow you to download the APK of any of the [officially suppor

You'll need at least [Zulu JDK 17](https://www.azul.com/downloads/?version=java-17-lts&package=jdk) and [ADB](https://developer.android.com/studio/command-line/adb) (optional, required only for rooted phones).

If you plan to use it from source, you'll also require [NodeJS >=13](https://nodejs.org/).
If you plan to use it from source, you'll also require [Node.js >= 16](https://nodejs.org/).

## How to use

Expand Down
24 changes: 12 additions & 12 deletions android-interface.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RVB_DIR=$HOME/revanced-builder
COLOR_OFF='\033[0m'
COLOR_RED='\033[1;31m'

help_info () {
help_info() {
cat <<EOF
Usage: $SCR_NAME [command] [options]

Expand All @@ -34,17 +34,17 @@ Commands:
EOF
}

log () {
log() {
echo -e "[$SCR_NAME] $1"
}

error () {
error() {
log "$1"
[[ "$2" == y ]] && help_info
exit ${3:-1}
}

dload_and_install () {
dload_and_install() {
log "Downloading revanced-builder..."
curl -sLo revanced-builder.zip https://github.com/reisxd/revanced-builder/archive/refs/heads/main.zip
log "Unzipping..."
Expand All @@ -57,8 +57,8 @@ dload_and_install () {
[[ -z "$1" ]] && log "Done. Execute \`$SCR_NAME_EXEC run\` to launch the builder."
}

preflight () {
setup_storage () {
preflight() {
setup_storage() {
if [[ ! -d $HOME/storage ]]; then
log "You will now get a permission dialog to allow access to storage."
log "This is needed in order to move the built APK (+ MicroG) to Internal Storage."
Expand All @@ -69,7 +69,7 @@ preflight () {
fi
}

install_dependencies () {
install_dependencies() {
local JAVA_NF NODE_NF
which java >/dev/null || JAVA_NF=1
which node >/dev/null || NODE_NF=1
Expand Down Expand Up @@ -104,19 +104,19 @@ Possible reasons (in the order of commonality):
fi
}

run_builder () {
run_builder() {
preflight
echo
if [[ $1 == "--delete-cache" ]]; then
# Is this even called a cache?
log "Deleteting builder cache..."
log "Deleting builder cache..."
rm -rf $RVB_DIR/revanced
fi
cd $RVB_DIR
node .
}

reinstall_builder () {
reinstall_builder() {
log "Deleting revanced-builder..."
if [[ $1 != "--delete-keystore" ]]; then
if [ -f "$RVB_DIR/revanced/revanced.keystore" ]; then
Expand All @@ -137,7 +137,7 @@ reinstall_builder () {
dload_and_install
}

update_builder () {
update_builder() {
log "Backing up some stuff..."
if [ -d "$RVB_DIR/revanced" ]; then
mkdir -p $HOME/revanced_backup
Expand All @@ -162,7 +162,7 @@ update_builder () {
dload_and_install
}

main () {
main() {
if [[ -z "$@" ]]; then
run_builder
elif [[ $# -gt 2 ]]; then
Expand Down