Files
drawio-desktop-mirror/sync.cjs
David BensonandClaude Opus 5 88bd7bc72b Reverts the legacy fuse2 AppImage build [jgraph/drawio-desktop#2538]
Reverts 71d1c3c. AppImageLauncher 2.x is the only thing the static runtime
cannot serve, and upgrading it is a .deb away, so a second AppImage is not
worth the confusion on the releases page. Documented in the README instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 13:35:28 +01:00

30 lines
961 B
JavaScript

const fs = require('fs')
const path = require('path')
const appjsonpath = path.join(__dirname, 'package.json')
const disableUpdatePath = path.join(__dirname, 'src/main', 'disableUpdate.js')
const versionPath = path.join(__dirname, 'drawio', 'VERSION')
if (!fs.existsSync(versionPath))
{
console.error('Error: drawio/VERSION not found. Did you clone with --recursive or run git submodule update --init?')
process.exit(1)
}
let ver = fs.readFileSync(versionPath, 'utf8').trim()
//let ver = '14.1.5' // just to test autoupdate
if (!/^\d+\.\d+\.\d+$/.test(ver))
{
console.error('Error: drawio/VERSION contains invalid version: "' + ver + '"')
process.exit(1)
}
let pj = require(appjsonpath)
pj.version = ver
fs.writeFileSync(appjsonpath, JSON.stringify(pj, null, 2), 'utf8')
//Enable/disable updates
fs.writeFileSync(disableUpdatePath, 'export function disableUpdate() { return ' + (process.argv[2] == 'disableUpdate'? 'true' : 'false') + ';}', 'utf8');