mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-08 01:10:03 +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",
|
||||
"version": "1.11.2",
|
||||
"version": "1.11.3",
|
||||
"description": "Simplifying building firefox forks!",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
|
|
@ -31,16 +31,15 @@ export const commands: Cmd[] = [
|
|||
},
|
||||
{
|
||||
arg: '-j, --jobs <number>',
|
||||
description:
|
||||
'Number of jobs to run in parallel',
|
||||
description: 'Number of jobs to run in parallel',
|
||||
parse: (val: string) => {
|
||||
const parsed = parseInt(val, 10)
|
||||
if (isNaN(parsed)) {
|
||||
throw new Error('Invalid number of jobs')
|
||||
}
|
||||
return parsed
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
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)
|
||||
}
|
||||
|
||||
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.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===`
|
||||
)
|
||||
|
||||
return (await configDispatch('./mach', {
|
||||
args: buildOptions,
|
||||
cwd: ENGINE_DIR,
|
||||
killOnError: true,
|
||||
})).success
|
||||
return (
|
||||
await configDispatch('./mach', {
|
||||
args: buildOptions,
|
||||
cwd: ENGINE_DIR,
|
||||
killOnError: true,
|
||||
})
|
||||
).success
|
||||
}
|
||||
|
||||
const parseDate = (d: number) => {
|
||||
|
|
|
@ -36,7 +36,8 @@ ac_add_options --enable-rust-simd`
|
|||
}
|
||||
}
|
||||
|
||||
return `
|
||||
return (
|
||||
`
|
||||
# =====================
|
||||
# Internal surfer config
|
||||
# =====================
|
||||
|
@ -52,11 +53,15 @@ ac_add_options --enable-update-channel=${brand}
|
|||
|
||||
export ZEN_FIREFOX_VERSION=${getFFVersionOrCandidate()}
|
||||
export MOZ_APPUPDATE_HOST=${
|
||||
config.updateHostname || 'localhost:7648 # This should not resolve'
|
||||
}
|
||||
` + (process as any).surferPlatform === 'darwin' ? `
|
||||
config.updateHostname || 'localhost:7648 # This should not resolve'
|
||||
}
|
||||
` +
|
||||
((process as any).surferPlatform === 'darwin'
|
||||
? `
|
||||
|
||||
# MacOS specific settings
|
||||
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
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import execa from 'execa';
|
||||
import { BASH_PATH } from '../constants';
|
||||
import { log } from '../log';
|
||||
import execa from 'execa'
|
||||
import { BASH_PATH } from '../constants'
|
||||
import { log } from '../log'
|
||||
|
||||
export const removeTimestamp = (input: string): string =>
|
||||
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 = (
|
||||
cmd: string,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue