Compare commits

..

No commits in common. "324a4a1e6fd7021d0cba377a7653ca27fbb66bc9" and "2068b7470bc75c4976308246e8b707b4171422b5" have entirely different histories.

2 changed files with 4 additions and 30 deletions

View File

@ -9,7 +9,6 @@ import { launchMacInstaller } from './macappupdate.js'
import { launchWindowsInstaller } from './winappupdate.js' import { launchWindowsInstaller } from './winappupdate.js'
import { checkForDuplicateInstallations } from './check-duplicate-installations.js' import { checkForDuplicateInstallations } from './check-duplicate-installations.js'
import { scheduleAppRestart } from './updater-runner.js' import { scheduleAppRestart } from './updater-runner.js'
import buildInfo from '../buildInfo.json'
import { getAppSettings, setAppSettings } from './store.js' import { getAppSettings, setAppSettings } from './store.js'
const SUPPORTED_TARGETS = { const SUPPORTED_TARGETS = {
@ -216,30 +215,8 @@ const downloadArtifact = async (artifact, destinationPath, sendProgress) => {
const getRunningEngine = (mainWindow) => const getRunningEngine = (mainWindow) =>
mainWindow?.renderer === 'cef' ? 'chromium' : 'native' mainWindow?.renderer === 'cef' ? 'chromium' : 'native'
const formatFullAppVersion = (version, buildNumber) => {
const normalizedVersion = String(version || '')
.trim()
.replace(/^v/i, '')
if (!normalizedVersion) return null
const build = String(
buildNumber || process.env.BUILD_NUMBER || process.env.VITE_BUILD_NUMBER || ''
).trim()
const buildSuffix =
!build || build === 'dev' ? 'dev' : build.startsWith('b') ? build : `b${build}`
return `v${normalizedVersion}-${buildSuffix}`
}
const getRunningAppVersion = () =>
formatFullAppVersion(
process.env.ELECTROBUN_VERSION,
buildInfo?.buildNumber
)
const getRunningAppState = (mainWindow, settings) => ({ const getRunningAppState = (mainWindow, settings) => ({
version: getRunningAppVersion(), version: process.env.ELECTROBUN_VERSION || null,
branch: settings?.appUpdateRunningBranch || null, branch: settings?.appUpdateRunningBranch || null,
engine: getRunningEngine(mainWindow) engine: getRunningEngine(mainWindow)
}) })

View File

@ -45,10 +45,7 @@ const parseWindowsInstallerProgress = (output) => {
const copyFile = line.match(/^installer:COPY_FILE:(\d+):(.*)$/) const copyFile = line.match(/^installer:COPY_FILE:(\d+):(.*)$/)
if (copyFile) { if (copyFile) {
const fileBytes = Number.parseInt(copyFile[1], 10) const fileBytes = Number.parseInt(copyFile[1], 10)
var fileName = copyFile[2].trim() const relativePath = copyFile[2].trim()
if (fileName.includes('\\')) {
fileName = fileName.split('\\').pop()
}
if (Number.isFinite(fileBytes)) { if (Number.isFinite(fileBytes)) {
copiedBytes += fileBytes copiedBytes += fileBytes
@ -60,8 +57,8 @@ const parseWindowsInstallerProgress = (output) => {
} }
} }
if (fileName) { if (relativePath) {
message = `Copying ${fileName} (${formatBytes(fileBytes)})` message = `Copying ${relativePath} (${formatBytes(fileBytes)})`
} }
} }
} else if ( } else if (