mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-07 17:05:33 +02:00
bump version to 1.11.3 and refactor code for improved readability
Some checks are pending
CI / general (push) Waiting to run
Some checks are pending
CI / general (push) Waiting to run
This commit is contained in:
parent
47924ece7b
commit
1c14203808
5 changed files with 30 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@zen-browser/surfer",
|
"name": "@zen-browser/surfer",
|
||||||
"version": "1.11.2",
|
"version": "1.11.3",
|
||||||
"description": "Simplifying building firefox forks!",
|
"description": "Simplifying building firefox forks!",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|
|
@ -31,16 +31,15 @@ export const commands: Cmd[] = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
arg: '-j, --jobs <number>',
|
arg: '-j, --jobs <number>',
|
||||||
description:
|
description: 'Number of jobs to run in parallel',
|
||||||
'Number of jobs to run in parallel',
|
|
||||||
parse: (val: string) => {
|
parse: (val: string) => {
|
||||||
const parsed = parseInt(val, 10)
|
const parsed = parseInt(val, 10)
|
||||||
if (isNaN(parsed)) {
|
if (isNaN(parsed)) {
|
||||||
throw new Error('Invalid number of jobs')
|
throw new Error('Invalid number of jobs')
|
||||||
}
|
}
|
||||||
return parsed
|
return parsed
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
requestController: async () => (await import('./commands/build')).build,
|
requestController: async () => (await import('./commands/build')).build,
|
||||||
},
|
},
|
||||||
|
|
|
@ -110,7 +110,11 @@ const applyConfig = async (os: string) => {
|
||||||
writeFileSync(join(ENGINE_DIR, 'browser/config/version_display.txt'), version)
|
writeFileSync(join(ENGINE_DIR, 'browser/config/version_display.txt'), version)
|
||||||
}
|
}
|
||||||
|
|
||||||
const genericBuild = async (os: string, fast = false, jobs: number): Promise<boolean> => {
|
const genericBuild = async (
|
||||||
|
os: string,
|
||||||
|
fast = false,
|
||||||
|
jobs: number
|
||||||
|
): Promise<boolean> => {
|
||||||
log.info(`Building for "${os}"...`)
|
log.info(`Building for "${os}"...`)
|
||||||
|
|
||||||
log.warning(
|
log.warning(
|
||||||
|
@ -133,11 +137,13 @@ const genericBuild = async (os: string, fast = false, jobs: number): Promise<boo
|
||||||
`Mach contents: \n ${readFileSync(join(ENGINE_DIR, 'mach'))}\n\n===END===`
|
`Mach contents: \n ${readFileSync(join(ENGINE_DIR, 'mach'))}\n\n===END===`
|
||||||
)
|
)
|
||||||
|
|
||||||
return (await configDispatch('./mach', {
|
return (
|
||||||
args: buildOptions,
|
await configDispatch('./mach', {
|
||||||
cwd: ENGINE_DIR,
|
args: buildOptions,
|
||||||
killOnError: true,
|
cwd: ENGINE_DIR,
|
||||||
})).success
|
killOnError: true,
|
||||||
|
})
|
||||||
|
).success
|
||||||
}
|
}
|
||||||
|
|
||||||
const parseDate = (d: number) => {
|
const parseDate = (d: number) => {
|
||||||
|
|
|
@ -36,7 +36,8 @@ ac_add_options --enable-rust-simd`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return `
|
return (
|
||||||
|
`
|
||||||
# =====================
|
# =====================
|
||||||
# Internal surfer config
|
# Internal surfer config
|
||||||
# =====================
|
# =====================
|
||||||
|
@ -52,11 +53,15 @@ ac_add_options --enable-update-channel=${brand}
|
||||||
|
|
||||||
export ZEN_FIREFOX_VERSION=${getFFVersionOrCandidate()}
|
export ZEN_FIREFOX_VERSION=${getFFVersionOrCandidate()}
|
||||||
export MOZ_APPUPDATE_HOST=${
|
export MOZ_APPUPDATE_HOST=${
|
||||||
config.updateHostname || 'localhost:7648 # This should not resolve'
|
config.updateHostname || 'localhost:7648 # This should not resolve'
|
||||||
}
|
}
|
||||||
` + (process as any).surferPlatform === 'darwin' ? `
|
` +
|
||||||
|
((process as any).surferPlatform === 'darwin'
|
||||||
|
? `
|
||||||
|
|
||||||
# MacOS specific settings
|
# MacOS specific settings
|
||||||
export MOZ_MACBUNDLE_NAME="${getCurrentBrandName()}.app"
|
export MOZ_MACBUNDLE_NAME="${getCurrentBrandName()}.app"
|
||||||
` : '';
|
`
|
||||||
|
: '')
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
import execa from 'execa';
|
import execa from 'execa'
|
||||||
import { BASH_PATH } from '../constants';
|
import { BASH_PATH } from '../constants'
|
||||||
import { log } from '../log';
|
import { log } from '../log'
|
||||||
|
|
||||||
export const removeTimestamp = (input: string): string =>
|
export const removeTimestamp = (input: string): string =>
|
||||||
input.replace(/\s\d{1,5}:\d\d\.\d\d /g, '')
|
input.replace(/\s\d{1,5}:\d\d\.\d\d /g, '')
|
||||||
|
|
||||||
type CommandResult = { success: boolean, output: string[] };
|
type CommandResult = { success: boolean; output: string[] }
|
||||||
|
|
||||||
export const configDispatch = (
|
export const configDispatch = (
|
||||||
cmd: string,
|
cmd: string,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue