mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-07 17:05:33 +02:00
bump version to 1.8.5 and implement getFFVersionOrCandidate utility for version handling
Some checks failed
CI / general (push) Has been cancelled
Some checks failed
CI / general (push) Has been cancelled
This commit is contained in:
parent
427dad782b
commit
eb88a86228
6 changed files with 13 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@zen-browser/surfer",
|
"name": "@zen-browser/surfer",
|
||||||
"version": "1.8.3",
|
"version": "1.8.5",
|
||||||
"description": "Simplifying building firefox forks!",
|
"description": "Simplifying building firefox forks!",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|
|
@ -20,7 +20,7 @@ import {
|
||||||
resolveAddonDownloadUrl,
|
resolveAddonDownloadUrl,
|
||||||
unpackAddon,
|
unpackAddon,
|
||||||
} from './addon'
|
} from './addon'
|
||||||
import { configPath, shouldUseCandidate } from '../../utils'
|
import { configPath, getFFVersionOrCandidate, shouldUseCandidate } from '../../utils'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
export function shouldSetupFirefoxSource() {
|
export function shouldSetupFirefoxSource() {
|
||||||
|
@ -81,7 +81,7 @@ async function unpackFirefoxSource(name: string): Promise<void> {
|
||||||
])
|
])
|
||||||
const archiveDir = resolve(
|
const archiveDir = resolve(
|
||||||
MELON_TMP_DIR,
|
MELON_TMP_DIR,
|
||||||
'firefox-' + config.version.version
|
'firefox-' + getFFVersionOrCandidate()
|
||||||
)
|
)
|
||||||
if (existsSync(ENGINE_DIR)) {
|
if (existsSync(ENGINE_DIR)) {
|
||||||
// remove the existing engine directory
|
// remove the existing engine directory
|
||||||
|
|
|
@ -10,6 +10,7 @@ import {
|
||||||
dynamicConfig,
|
dynamicConfig,
|
||||||
ensureEmpty,
|
ensureEmpty,
|
||||||
generateHash,
|
generateHash,
|
||||||
|
getFFVersionOrCandidate,
|
||||||
getSize,
|
getSize,
|
||||||
ReleaseInfo,
|
ReleaseInfo,
|
||||||
} from '../../utils'
|
} from '../../utils'
|
||||||
|
@ -186,7 +187,7 @@ export async function generateBrowserUpdateFiles() {
|
||||||
'@type': 'minor',
|
'@type': 'minor',
|
||||||
'@displayVersion': version,
|
'@displayVersion': version,
|
||||||
'@appVersion': version,
|
'@appVersion': version,
|
||||||
'@platformVersion': config.version.version,
|
'@platformVersion': getFFVersionOrCandidate(),
|
||||||
'@buildID': platform.Build.BuildID,
|
'@buildID': platform.Build.BuildID,
|
||||||
|
|
||||||
patch: {
|
patch: {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { config } from '..'
|
import { config } from '..'
|
||||||
|
import { getFFVersionOrCandidate } from '../utils'
|
||||||
|
|
||||||
const otherBuildModes = `# You can change to other build modes by running:
|
const otherBuildModes = `# You can change to other build modes by running:
|
||||||
# $ surfer set buildMode [dev|debug|release]`
|
# $ surfer set buildMode [dev|debug|release]`
|
||||||
|
@ -48,7 +49,7 @@ ac_add_options --with-branding=browser/branding/${brand}
|
||||||
ac_add_options --enable-unverified-updates
|
ac_add_options --enable-unverified-updates
|
||||||
ac_add_options --enable-update-channel=${brand}
|
ac_add_options --enable-update-channel=${brand}
|
||||||
|
|
||||||
export ZEN_FIREFOX_VERSION=${config.version.version}
|
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'
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ import commander, { Command } from 'commander'
|
||||||
import { existsSync, readFileSync } from 'node:fs'
|
import { existsSync, readFileSync } from 'node:fs'
|
||||||
import { resolve } from 'node:path'
|
import { resolve } from 'node:path'
|
||||||
|
|
||||||
import { errorHandler, config as configInited, versionFormatter } from './utils'
|
import { errorHandler, config as configInited, versionFormatter, getFFVersionOrCandidate } from './utils'
|
||||||
import { commands } from './cmds'
|
import { commands } from './cmds'
|
||||||
import { BIN_NAME, ENGINE_DIR } from './constants'
|
import { BIN_NAME, ENGINE_DIR } from './constants'
|
||||||
import { updateCheck } from './middleware/update-check'
|
import { updateCheck } from './middleware/update-check'
|
||||||
|
@ -41,7 +41,7 @@ if (existsSync(resolve(ENGINE_DIR, 'browser', 'config', 'version.txt'))) {
|
||||||
.toString()
|
.toString()
|
||||||
.replace(/\n/g, '')
|
.replace(/\n/g, '')
|
||||||
|
|
||||||
if (version !== config.version.version) reportedFFVersion = version
|
if (version !== getFFVersionOrCandidate()) reportedFFVersion = version
|
||||||
}
|
}
|
||||||
|
|
||||||
export const bin_name = BIN_NAME
|
export const bin_name = BIN_NAME
|
||||||
|
|
|
@ -20,6 +20,10 @@ export const shouldUseCandidate = (): boolean => {
|
||||||
return brandingKey !== 'stable' && (config.version.version !== config.version.candidate);
|
return brandingKey !== 'stable' && (config.version.version !== config.version.candidate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getFFVersionOrCandidate = () => {
|
||||||
|
return shouldUseCandidate() ? config.version.candidate : config.version.version
|
||||||
|
}
|
||||||
|
|
||||||
export const getLatestFF = async (
|
export const getLatestFF = async (
|
||||||
product: SupportedProducts = SupportedProducts.Firefox
|
product: SupportedProducts = SupportedProducts.Firefox
|
||||||
): Promise<string> => {
|
): Promise<string> => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue