Refactor applyPatches function to conditionally import branding patches

This commit is contained in:
mr. M 2024-10-27 12:03:31 +01:00
parent e0583c2e94
commit 05571adb8b
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
2 changed files with 6 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@zen-browser/surfer",
"version": "1.5.1",
"version": "1.5.2",
"description": "Simplifying building firefox forks!",
"main": "index.js",
"bin": {

View file

@ -112,10 +112,12 @@ async function importInternalPatch(): Promise<Task> {
}
export async function applyPatches(): Promise<void> {
await new TaskList([
const canDoBrandingPatch = process.env.SURFER_NO_BRANDING_PATCH !== 'true'
let tasks = [
await importInternalPatch(),
importMelonPatches(),
canDoBrandingPatch ? importMelonPatches() : undefined,
await importFolders(),
await importGitPatch(),
]).run()
].filter((task) => task !== undefined) as Task[]
await new TaskList(tasks).run()
}