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

Commit

Permalink
fix: build as revanced.apk, rename afterwards
Browse files Browse the repository at this point in the history
Signed-off-by: shrihanDev <[email protected]>
  • Loading branch information
shrihankp committed Aug 8, 2022
1 parent 006741d commit 3178bd8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wsEvents/PatchApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ async function mount (ws) {

async function afterBuild (ws) {
fs.rmdirSync('./revanced-cache', { recursive: true, force: true });
outputName();
fs.renameSync('./revanced/revanced.apk', `./revanced/${global.outputName}`;
if (!global.jarNames.isRooted && os.platform() === 'android') {
await actualExec(
`cp revanced/${global.outputName} /storage/emulated/0/${global.outputName}`
Expand Down Expand Up @@ -152,7 +154,6 @@ function outputName () {
}

module.exports = async function (message, ws) {
outputName();
const args = [
'-jar',
global.jarNames.cli,
Expand All @@ -162,7 +163,7 @@ module.exports = async function (message, ws) {
'./revanced-cache',
'--experimental',
'-a',
`./revanced/${global.jarNames.selectedApp}.apk`,
`./revanced/revanced.apk`,
'-o',
`./revanced/${global.outputName}`
];
Expand Down

0 comments on commit 3178bd8

Please sign in to comment.