bump version to 1.8.5 and implement getFFVersionOrCandidate utility for version handling
Some checks failed
CI / general (push) Has been cancelled

This commit is contained in:
mr. M 2024-12-31 19:40:13 +01:00
parent 427dad782b
commit eb88a86228
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
6 changed files with 13 additions and 7 deletions

View file

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

View file

@ -20,7 +20,7 @@ import {
resolveAddonDownloadUrl,
unpackAddon,
} from './addon'
import { configPath, shouldUseCandidate } from '../../utils'
import { configPath, getFFVersionOrCandidate, shouldUseCandidate } from '../../utils'
import fs from 'fs-extra'
export function shouldSetupFirefoxSource() {
@ -81,7 +81,7 @@ async function unpackFirefoxSource(name: string): Promise<void> {
])
const archiveDir = resolve(
MELON_TMP_DIR,
'firefox-' + config.version.version
'firefox-' + getFFVersionOrCandidate()
)
if (existsSync(ENGINE_DIR)) {
// remove the existing engine directory

View file

@ -10,6 +10,7 @@ import {
dynamicConfig,
ensureEmpty,
generateHash,
getFFVersionOrCandidate,
getSize,
ReleaseInfo,
} from '../../utils'
@ -186,7 +187,7 @@ export async function generateBrowserUpdateFiles() {
'@type': 'minor',
'@displayVersion': version,
'@appVersion': version,
'@platformVersion': config.version.version,
'@platformVersion': getFFVersionOrCandidate(),
'@buildID': platform.Build.BuildID,
patch: {

View file

@ -1,4 +1,5 @@
import { config } from '..'
import { getFFVersionOrCandidate } from '../utils'
const otherBuildModes = `# You can change to other build modes by running:
# $ 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-update-channel=${brand}
export ZEN_FIREFOX_VERSION=${config.version.version}
export ZEN_FIREFOX_VERSION=${getFFVersionOrCandidate()}
export MOZ_APPUPDATE_HOST=${
config.updateHostname || 'localhost:7648 # This should not resolve'
}

View file

@ -16,7 +16,7 @@ import commander, { Command } from 'commander'
import { existsSync, readFileSync } from 'node:fs'
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 { BIN_NAME, ENGINE_DIR } from './constants'
import { updateCheck } from './middleware/update-check'
@ -41,7 +41,7 @@ if (existsSync(resolve(ENGINE_DIR, 'browser', 'config', 'version.txt'))) {
.toString()
.replace(/\n/g, '')
if (version !== config.version.version) reportedFFVersion = version
if (version !== getFFVersionOrCandidate()) reportedFFVersion = version
}
export const bin_name = BIN_NAME

View file

@ -20,6 +20,10 @@ export const shouldUseCandidate = (): boolean => {
return brandingKey !== 'stable' && (config.version.version !== config.version.candidate);
}
export const getFFVersionOrCandidate = () => {
return shouldUseCandidate() ? config.version.candidate : config.version.version
}
export const getLatestFF = async (
product: SupportedProducts = SupportedProducts.Firefox
): Promise<string> => {