fix: publish Linux desktop builds from dedicated builder
Some checks failed
CI / verify (push) Has been cancelled
CI / print-rust (push) Has been cancelled

This commit is contained in:
Admin 2026-09-25 22:04:06 +00:00
parent d205fd99bb
commit 051ee42019
2 changed files with 5 additions and 4 deletions

View File

@ -31,4 +31,5 @@ export const config = {
webOrigin: process.env.WEB_ORIGIN?.trim() || 'http://localhost:5173',
staticDir: process.env.STATIC_DIR?.trim() || '',
desktopDownloadBaseUrl: process.env.FIELDLENS_DESKTOP_DOWNLOAD_BASE_URL?.trim() || 'https://git.arrowstack.dev/Admin/fieldlens-desktop/raw/branch/main/downloads',
linuxDesktopDownloadBaseUrl: process.env.FIELDLENS_LINUX_DESKTOP_DOWNLOAD_BASE_URL?.trim() || process.env.FIELDLENS_DESKTOP_DOWNLOAD_BASE_URL?.trim() || 'https://git.arrowstack.dev/Admin/fieldlens-desktop/raw/branch/main/downloads',
}

View File

@ -61,8 +61,8 @@ app.get('/api/health/live', (_req, res) => {
res.json({ status: 'live', version: process.env.FIELDLENS_VERSION ?? 'dev' })
})
function redirectDesktopDownload(res: express.Response, filename: string) {
const base = config.desktopDownloadBaseUrl.replace(/\/$/, '')
function redirectDesktopDownload(res: express.Response, filename: string, baseUrl = config.desktopDownloadBaseUrl) {
const base = baseUrl.replace(/\/$/, '')
res.setHeader('Cache-Control', 'no-store')
res.redirect(302, `${base}/${filename}`)
}
@ -72,7 +72,7 @@ app.get('/downloads/fieldlens-print-windows-x64-setup.exe', (_req, res) => {
})
app.get('/downloads/fieldlens-print-linux-x64.deb', (_req, res) => {
redirectDesktopDownload(res, 'fieldlens-print-linux-x64.deb')
redirectDesktopDownload(res, 'fieldlens-print-linux-x64.deb', config.linuxDesktopDownloadBaseUrl)
})
app.get('/downloads/install.sh', (_req, res) => {
@ -109,7 +109,7 @@ app.get('/downloads/fieldlens-print/windows-x64', (_req, res) => {
})
app.get('/downloads/fieldlens-print/linux-x64.deb', (_req, res) => {
redirectDesktopDownload(res, 'fieldlens-print-linux-x64.deb')
redirectDesktopDownload(res, 'fieldlens-print-linux-x64.deb', config.linuxDesktopDownloadBaseUrl)
})
app.get('/api/health/ready', async (_req, res) => {