diff --git a/.gitea/workflows/build-and-package.yml b/.gitea/workflows/build-and-package.yml index 6e0bf3e..de8bbae 100644 --- a/.gitea/workflows/build-and-package.yml +++ b/.gitea/workflows/build-and-package.yml @@ -87,6 +87,7 @@ jobs: run: | set -euo pipefail # Application packaging also populates the fpm/AppImage tool cache. + node scripts/write-build-info.js npx --yes electron-builder@26.15.3 --linux rpm AppImage --x64 --publish never bash packaging/runtime/build-runtime-appimage.sh bash packaging/runtime/build-runtime-rpm.sh diff --git a/.gitignore b/.gitignore index ba8b252..403d171 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ # Node artifact files node_modules/ dist/ +/.build/ # Compiled Java class files *.class diff --git a/CHANGELOG.md b/CHANGELOG.md index 760e1bb..44e9848 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to muSRFlow are recorded here. The project follows the release path documented in [`TODO.md`](TODO.md). +## Unreleased + +- Quick Start now identifies the exact muSRFlow version, desktop/web edition, + Git build revision, active runtime provider, musrfit version, and ROOT + version. Development and locally packaged modified trees are marked as such. +- Electron packages embed build provenance during Linux and Windows packaging; + web deployment stamps equivalent provenance from the deployed checkout and + configured server tools. +- Parameter-plot controls are hidden by default and toggle with a deliberate + tap or click on all pointer types; drag gestures remain reserved for plots. + ## 1.0.0 (2026-11-03) ### Stable release diff --git a/ZGUI.css b/ZGUI.css index 08a8742..3a5386d 100644 --- a/ZGUI.css +++ b/ZGUI.css @@ -3263,6 +3263,32 @@ body.quick-start-document { padding-left: 22px; } +.quick-start-identity { + color: var(--mu-green-dark); + font-size: 105%; +} + +.quick-start-build-details { + display: grid; + gap: 4px; + margin: 10px 0; +} + +.quick-start-build-details > div { + display: grid; + grid-template-columns: 5.5rem minmax(0, 1fr); +} + +.quick-start-build-details dt { + color: var(--mu-green-muted); + font-weight: 700; +} + +.quick-start-build-details dd { + margin: 0; + overflow-wrap: anywhere; +} + .quick-start-section-active { background: rgba(47, 111, 62, 0.08); border-left-color: var(--mu-green); diff --git a/main.js b/main.js index 498324c..811f7bd 100644 --- a/main.js +++ b/main.js @@ -53,6 +53,45 @@ let quickStartWindow = null; let mainWindow = null; let pendingSharedConfigurationURL = ""; +// Packaged applications contain build-info.json, generated immediately before +// electron-builder runs. A development checkout instead reports its live Git +// revision and whether local edits make it differ from that commit. +let cachedApplicationBuildInfo = null; +function applicationBuildInfo(runtimeInfo) { + if (!cachedApplicationBuildInfo) { + let revision = "unrecorded"; + let modified = false; + try { + const packaged = JSON.parse(fs.readFileSync(path.join(__dirname, "build-info.json"), "utf8")); + if (packaged && /^[0-9a-f]{40}$/i.test(packaged.revision || "")) { + revision = packaged.revision.slice(0, 12).toLowerCase(); + modified = packaged.modified === true; + } + } catch (error) { + if (!app.isPackaged) { + try { + revision = childProcess.execFileSync("git", ["rev-parse", "--short=12", "HEAD"], { + cwd: __dirname, encoding: "utf8", timeout: 2000 + }).trim(); + modified = childProcess.execFileSync("git", ["status", "--porcelain"], { + cwd: __dirname, encoding: "utf8", timeout: 2000 + }).trim() !== ""; + } catch (gitError) { + revision = "development source"; + } + } + } + const platformNames = { win32: "Windows", darwin: "macOS", linux: "Linux" }; + cachedApplicationBuildInfo = { + version: app.getVersion(), + edition: "Electron/" + (platformNames[process.platform] || process.platform), + revision: revision, + modified: modified + }; + } + return Object.assign({}, runtimeInfo || {}, cachedApplicationBuildInfo); +} + // Remember the last folder used by the Open/Save MSR dialogs, so a repeated // open or save starts where the previous one finished instead of the process // working directory. The remember is a tiny JSON file under userData; if it is @@ -335,11 +374,14 @@ function createWindow () { { label: 'About muSRFlow', click () { + const build = applicationBuildInfo(); dialog.showMessageBox(win, { type: 'info', title: 'About muSRFlow', message: `muSRFlow ${app.getVersion()}`, - detail: 'Desktop and web workflow for musrfit\n\nAuthor: Zaher Salman\nCopyright (C) 2026 Zaher Salman\nGNU GPL version 3 or later', + detail: build.edition + ' · build ' + build.revision + + (build.modified ? ' (modified)' : '') + + '\n\nDesktop and web workflow for musrfit\n\nAuthor: Zaher Salman\nCopyright (C) 2026 Zaher Salman\nGNU GPL version 3 or later', icon: path.join(__dirname, 'assets', 'musrflow-icon.png') }); } @@ -671,10 +713,11 @@ ipcMain.on("openParameterPlotWindow", (event, options) => { // shell as parameter plots. Reopening Help focuses the existing window. ipcMain.on("openQuickStartWindow", (event, options) => { const sectionId = options && options.sectionId ? options.sectionId : "helpRuns"; + const buildInfo = applicationBuildInfo(options && options.buildInfo); if (quickStartWindow && !quickStartWindow.isDestroyed()) { quickStartWindow.show(); quickStartWindow.focus(); - quickStartWindow.webContents.send("quickStartSection", { sectionId: sectionId }); + quickStartWindow.webContents.send("quickStartSection", { sectionId: sectionId, buildInfo: buildInfo }); return; } @@ -686,7 +729,7 @@ ipcMain.on("openQuickStartWindow", (event, options) => { minHeight: 360, file: "quick-start.html", dataChannel: "quickStartSection", - data: { sectionId: sectionId, version: app.getVersion() } + data: { sectionId: sectionId, buildInfo: buildInfo } }); quickStartWindow.on("closed", () => { quickStartWindow = null; diff --git a/muSRFitelec.js b/muSRFitelec.js index 0e968c7..04152c0 100644 --- a/muSRFitelec.js +++ b/muSRFitelec.js @@ -316,6 +316,39 @@ function openElectronAuxiliaryWindow(kind, options = {}) { } window.openElectronAuxiliaryWindow = openElectronAuxiliaryWindow; +let cachedQuickStartRuntimeInfo = null; +function electronQuickStartRuntimeInfo() { + if (cachedQuickStartRuntimeInfo) return Object.assign({}, cachedQuickStartRuntimeInfo); + let configured = typeof getConfiguredBinDir === "function" ? getConfiguredBinDir() : ""; + let provider = configured ? "configured tools" : "system tools"; + if (!configured && isWslRuntimeHost()) { + provider = "bundled WSL runtime"; + } else if (!configured && bundledRuntimeRoot()) { + provider = "bundled runtime"; + } else if (!configured && systemRuntimeRoot()) { + provider = "system runtime"; + } + let info = { runtimeProvider: provider, musrfit: "not reported", root: "not reported" }; + let command = resolveLocalCommand("musrfit"); + let launch = prepareLocalLaunch(command, ["--version"]); + let result = nodeChildProcess.spawnSync(launch.command, launch.args, { + env: buildToolEnvironment(), + encoding: "utf8", + shell: false, + timeout: 5000 + }); + if (!result.error && result.status === 0) { + let output = (result.stdout || "") + "\n" + (result.stderr || ""); + let musrfit = output.match(/musrfit version:\s*([^,\s]+)/i); + let root = output.match(/ROOT version:\s*([^,\s]+)/i); + if (musrfit) info.musrfit = musrfit[1]; + if (root) info.root = root[1].replace("/", "."); + } + cachedQuickStartRuntimeInfo = info; + return Object.assign({}, info); +} +window.getMuSRFlowBuildInfo = electronQuickStartRuntimeInfo; + // Parameter-plot opening is the only part of the plotting workflow owned by // the main Electron renderer. The actual plot UI is rendered by the shared // muSRFitParameterPlot.js inside the auxiliary BrowserWindow. diff --git a/muSRFitlib.js b/muSRFitlib.js index 17d7375..8dc26b9 100644 --- a/muSRFitlib.js +++ b/muSRFitlib.js @@ -7227,7 +7227,11 @@ function showQuickStartHelp() { // This helper exists only in the Electron renderer, so do not rely on the // generic amIWeb() test here. if (typeof window.openElectronAuxiliaryWindow === "function") { - if (window.openElectronAuxiliaryWindow("quickStart", { sectionId: sectionId })) return; + let options = { sectionId: sectionId }; + if (typeof window.getMuSRFlowBuildInfo === "function") { + options.buildInfo = window.getMuSRFlowBuildInfo(); + } + if (window.openElectronAuxiliaryWindow("quickStart", options)) return; } // The browser keeps Help modeless so the main application remains usable. diff --git a/package.json b/package.json index fa173d9..56478b3 100644 --- a/package.json +++ b/package.json @@ -5,14 +5,15 @@ "description": "A desktop and web workflow for musrfit", "main": "main.js", "scripts": { + "build:identity": "node scripts/write-build-info.js", "start": "electron .", "test": "npm run test:electron && node tests/cgi-hardening.test.js && node tests/cgi-startup.test.js && node tests/cgi-run-download.test.js && node tests/cgi-integration.test.js && node tests/integration-musrfit.test.js", - "dist:linux": "npm run test:electron && npx --yes electron-builder@26.15.3 --linux rpm AppImage --x64 && bash packaging/runtime/build-runtime-appimage.sh && bash packaging/runtime/build-runtime-rpm.sh && bash packaging/runtime/build-runtime-archive.sh", - "dist:rpm": "npm run test:electron && npx --yes electron-builder@26.15.3 --linux rpm --x64 && bash packaging/runtime/build-runtime-rpm.sh && bash packaging/runtime/build-runtime-archive.sh", - "dist:appimage": "npm run test:electron && npx --yes electron-builder@26.15.3 --linux AppImage --x64 && bash packaging/runtime/build-runtime-appimage.sh && bash packaging/runtime/build-runtime-archive.sh", + "dist:linux": "npm run test:electron && npm run build:identity && npx --yes electron-builder@26.15.3 --linux rpm AppImage --x64 && bash packaging/runtime/build-runtime-appimage.sh && bash packaging/runtime/build-runtime-rpm.sh && bash packaging/runtime/build-runtime-archive.sh", + "dist:rpm": "npm run test:electron && npm run build:identity && npx --yes electron-builder@26.15.3 --linux rpm --x64 && bash packaging/runtime/build-runtime-rpm.sh && bash packaging/runtime/build-runtime-archive.sh", + "dist:appimage": "npm run test:electron && npm run build:identity && npx --yes electron-builder@26.15.3 --linux AppImage --x64 && bash packaging/runtime/build-runtime-appimage.sh && bash packaging/runtime/build-runtime-archive.sh", "dist:runtime": "bash packaging/runtime/build-runtime-appimage.sh && bash packaging/runtime/build-runtime-rpm.sh && bash packaging/runtime/build-runtime-archive.sh", "dist:runtime:archive": "bash packaging/runtime/build-runtime-archive.sh", - "dist:win": "npm run test:electron && npx --yes electron-builder@26.15.3 --win nsis --x64", + "dist:win": "npm run test:electron && npm run build:identity && npx --yes electron-builder@26.15.3 --win nsis --x64", "checksums:md5": "sh -c 'd=dist; [ -d \"$d\" ] || exit 0; for f in \"$d\"/*; do [ -f \"$f\" ] || continue; case \"$f\" in *.rpm|*.AppImage) base=$(basename \"$f\"); (cd \"$d\" && md5sum \"$base\" > \"$base.md5\");; esac; done'", "checksums:sha256": "sh -c 'd=dist; [ -d \"$d\" ] || exit 0; for f in \"$d\"/*; do [ -f \"$f\" ] || continue; case \"$f\" in *.rpm|*.AppImage) base=$(basename \"$f\"); (cd \"$d\" && sha256sum \"$base\" > \"$base.sha256\");; esac; done'", "checksums": "npm run checksums:md5 && npm run checksums:sha256", @@ -63,6 +64,10 @@ "assets/**/*", "LICENSE", "package.json", + { + "from": ".build/build-info.json", + "to": "build-info.json" + }, "node_modules/**/*" ], "directories": { diff --git a/packaging/wsl2/build-windows-ci.sh b/packaging/wsl2/build-windows-ci.sh index a520b27..0504ac8 100644 --- a/packaging/wsl2/build-windows-ci.sh +++ b/packaging/wsl2/build-windows-ci.sh @@ -43,6 +43,7 @@ container_id=$("$engine" create --name "musrflow-windows-$$-$RANDOM" \ node --version wine --version npm ci --no-audit --no-fund + node scripts/write-build-info.js npx --yes electron-builder@26.15.3 --win nsis --x64 --publish never ') "$engine" start -a "$container_id" diff --git a/preload.js b/preload.js index 4348828..9490e7c 100644 --- a/preload.js +++ b/preload.js @@ -38,6 +38,7 @@ const ALLOWED_RECEIVE_CHANNELS = [ "startupXmlSelected", "binFolderSelected", "parameterPlotData", + "quickStartSection", "wslRuntimeStatus" ]; diff --git a/quick-start.html b/quick-start.html index 0c8413d..8538d52 100644 --- a/quick-start.html +++ b/quick-start.html @@ -52,7 +52,16 @@

About muSRFlow

-

muSRFlow __MUSRFLOW_VERSION__ is a desktop and web workflow for musrfit.

+

muSRFlow __MUSRFLOW_VERSION__ + __MUSRFLOW_EDITION__ + build __MUSRFLOW_REVISION____MUSRFLOW_MODIFIED__ +

+

Desktop and web workflow for musrfit.

+
+
Runtime
__MUSRFLOW_RUNTIME__
+
musrfit
__MUSRFIT_VERSION__
+
ROOT
__ROOT_VERSION__
+

Author: Zaher Salman. Copyright (C) 2026 Zaher Salman. GNU GPL version 3 or later.

@@ -78,28 +87,48 @@ }, 0); } - var versionSpan = document.getElementById("musrflowVersion"); - function setVersion(version) { - if (!versionSpan) return; - if (version) { - versionSpan.textContent = version; - } else if (versionSpan.textContent.indexOf("__MUSRFLOW_VERSION__") !== -1) { - versionSpan.textContent = "development build"; + function displayValue(id, value, fallback) { + let element = document.getElementById(id); + if (!element) return; + let current = element.textContent || ""; + if (value) element.textContent = value; + else if (/^__.+__$/.test(current)) element.textContent = fallback; + } + + function setBuildInfo(info) { + info = info || {}; + displayValue("musrflowVersion", info.version, "development source"); + displayValue("musrflowEdition", info.edition, "Web source"); + displayValue("musrflowRevision", info.revision, "unrecorded"); + displayValue("musrflowRuntime", info.runtimeProvider, "not reported"); + displayValue("musrfitVersion", info.musrfit, "not reported"); + displayValue("rootVersion", info.root, "not reported"); + let modified = document.getElementById("musrflowModified"); + if (modified && typeof info.modified === "boolean") { + modified.textContent = info.modified ? " (modified)" : ""; + } else if (modified && /^__.+__$/.test(modified.textContent || "")) { + modified.textContent = ""; } } window.focusQuickStartSection = focusSection; - setVersion(); + setBuildInfo(); focusSection(window.location.hash ? window.location.hash.slice(1) : "helpRuns"); window.addEventListener("hashchange", function() { focusSection(window.location.hash ? window.location.hash.slice(1) : "helpRuns"); }); - if (typeof require === "function") { + function receiveQuickStartPayload(payload) { + focusSection(payload && payload.sectionId ? payload.sectionId : "helpRuns"); + setBuildInfo(payload && payload.buildInfo); + } + + if (window.electronAPI && window.electronAPI.ipc) { + window.electronAPI.ipc.on("quickStartSection", receiveQuickStartPayload); + } else if (typeof require === "function") { try { require("electron").ipcRenderer.on("quickStartSection", function(event, payload) { - focusSection(payload && payload.sectionId ? payload.sectionId : "helpRuns"); - setVersion(payload && payload.version); + receiveQuickStartPayload(payload); }); } catch (error) { console.log("Could not attach Quick Start Electron channel:", error); diff --git a/scripts/deploy-web.sh b/scripts/deploy-web.sh index a9fe4a1..d47bed8 100755 --- a/scripts/deploy-web.sh +++ b/scripts/deploy-web.sh @@ -44,20 +44,40 @@ cp -R "$docs_source/." "$web_target/docs/" find "$web_target/docs" -type d -exec chmod 0755 {} + find "$web_target/docs" -type f -exec chmod 0644 {} + -# Brand the installed help page with the current release version, matching the -# About dialog in the Electron edition. The source keeps a __MUSRFLOW_VERSION__ -# token that renders as "development build" when left unsubstituted; the -# installed copy is rewritten with the version from package.json. Idempotent: -# an already-branded file contains no token, so re-running matches nothing. +# Stamp the deployed help with reproducible application and runtime identity. +# The Git revision identifies the exact deployed source; musrfit reports both +# its own and ROOT's versions using the same executable configured for the CGI. if command -v node >/dev/null 2>&1; then version="$(node -p 'require(process.argv[1]).version' "$project_root/package.json")" + revision="$(git -C "$project_root" rev-parse --short=12 HEAD 2>/dev/null || printf 'unrecorded')" + modified="" + if [ -n "$(git -C "$project_root" status --porcelain 2>/dev/null || true)" ]; then + modified=" (modified)" + fi + musrfit_bin="${MUSRFIT_BIN:-/usr/local/bin/musrfit}" + musrfit_output="" + if [ -x "$musrfit_bin" ]; then + musrfit_output="$("$musrfit_bin" --version 2>/dev/null || true)" + fi + musrfit_version="$(printf '%s\n' "$musrfit_output" | sed -n 's/.*musrfit version:[[:space:]]*\([^,[:space:]]*\).*/\1/p' | head -n 1)" + root_version="$(printf '%s\n' "$musrfit_output" | sed -n 's/.*ROOT version:[[:space:]]*\([^,[:space:]]*\).*/\1/p' | head -n 1 | tr / .)" + musrfit_version="${musrfit_version:-not reported}" + root_version="${root_version:-not reported}" tmp_qs="$(mktemp)" - sed "s#__MUSRFLOW_VERSION__#$version#g" "$web_target/quick-start.html" > "$tmp_qs" + sed -e "s#__MUSRFLOW_VERSION__#$version#g" \ + -e "s#__MUSRFLOW_EDITION__#Web#g" \ + -e "s#__MUSRFLOW_REVISION__#$revision#g" \ + -e "s#__MUSRFLOW_MODIFIED__#$modified#g" \ + -e "s#__MUSRFLOW_RUNTIME__#server tools#g" \ + -e "s#__MUSRFIT_VERSION__#$musrfit_version#g" \ + -e "s#__ROOT_VERSION__#$root_version#g" \ + "$web_target/quick-start.html" > "$tmp_qs" install -m 0644 "$tmp_qs" "$web_target/quick-start.html" rm -f "$tmp_qs" - printf 'Branded %s with muSRFlow version %s\n' "$web_target/quick-start.html" "$version" + printf 'Branded %s with muSRFlow %s · Web · build %s\n' \ + "$web_target/quick-start.html" "$version" "$revision" else - printf 'node not found; quick-start.html keeps the source version token\n' + printf 'node not found; quick-start.html keeps its development-source identity\n' fi # Apache executes the runner through the existing /cgi-bin ScriptAlias. diff --git a/scripts/write-build-info.js b/scripts/write-build-info.js new file mode 100644 index 0000000..0a32bbc --- /dev/null +++ b/scripts/write-build-info.js @@ -0,0 +1,43 @@ +// Copyright (C) 2026 Zaher Salman +// SPDX-License-Identifier: GPL-3.0-or-later + +// Generate immutable application provenance immediately before electron-builder +// packages the source. Keeping this outside package.json avoids changing release +// metadata merely to record which commit produced a particular binary. +const childProcess = require("child_process"); +const fs = require("fs"); +const path = require("path"); + +const projectRoot = path.resolve(__dirname, ".."); +const output = path.resolve(process.argv[2] || path.join(projectRoot, ".build", "build-info.json")); +const packageMetadata = require(path.join(projectRoot, "package.json")); + +let revision = String(process.env.MUSRFLOW_BUILD_REVISION || "").trim(); +if (!revision) { + revision = childProcess.execFileSync("git", ["rev-parse", "HEAD"], { + cwd: projectRoot, + encoding: "utf8" + }).trim(); +} +if (!/^[0-9a-f]{40}$/i.test(revision)) { + throw new Error("muSRFlow build revision is not a full Git commit hash"); +} +let modified; +if (/^[01]$/.test(process.env.MUSRFLOW_BUILD_MODIFIED || "")) { + modified = process.env.MUSRFLOW_BUILD_MODIFIED === "1"; +} else { + modified = childProcess.execFileSync("git", ["status", "--porcelain"], { + cwd: projectRoot, + encoding: "utf8" + }).trim() !== ""; +} + +fs.mkdirSync(path.dirname(output), { recursive: true }); +fs.writeFileSync(output, JSON.stringify({ + schemaVersion: 1, + version: packageMetadata.version, + revision: revision.toLowerCase(), + modified: modified +}, null, 2) + "\n"); +console.log("Wrote muSRFlow build identity " + packageMetadata.version + " @ " + revision.slice(0, 12) + + (modified ? " (modified)" : "")); diff --git a/tests/help-window.test.js b/tests/help-window.test.js index 8012c63..63b2f77 100644 --- a/tests/help-window.test.js +++ b/tests/help-window.test.js @@ -16,6 +16,7 @@ function testSharedHelpWindowInfrastructure() { const html = fs.readFileSync(path.join(repoRoot, "index.html"), "utf8"); const help = fs.readFileSync(path.join(repoRoot, "quick-start.html"), "utf8"); const deploy = fs.readFileSync(path.join(repoRoot, "scripts", "deploy-web.sh"), "utf8"); + const preload = fs.readFileSync(path.join(repoRoot, "preload.js"), "utf8"); assert.match(main, /function createAuxiliaryWindow/); assert.match(main, /createParameterPlotWindow[\s\S]*createAuxiliaryWindow/); @@ -38,12 +39,23 @@ function testSharedHelpWindowInfrastructure() { assert.match(help, /id="helpAbout"/); assert.match(help, /About muSRFlow/); assert.match(help, /id="musrflowVersion"/); - assert.match(help, /setVersion\(payload && payload\.version\)/); + assert.match(help, /id="musrflowRevision"/); + assert.match(help, /id="musrflowRuntime"/); + assert.match(help, /setBuildInfo\(payload && payload\.buildInfo\)/); + assert.match(help, /window\.electronAPI\.ipc\.on\("quickStartSection"/); + assert.match(preload, /"quickStartSection"/); assert.match(main, /version: app\.getVersion\(\)/); + assert.match(main, /Electron\/.*platformNames/); + assert.match(main, /build-info\.json/); + assert.match(elec, /electronQuickStartRuntimeInfo/); + assert.match(elec, /musrfit version:/); + assert.match(elec, /ROOT version:/); assert.match(main, /shell\.openExternal/); assert.match(main, /setWindowOpenHandler/); assert.match(deploy, /quick-start\.html/); assert.match(deploy, /__MUSRFLOW_VERSION__/); + assert.match(deploy, /__MUSRFLOW_REVISION__/); + assert.match(deploy, /git -C "\$project_root" rev-parse --short=12 HEAD/); assert.match(deploy, /node -p 'require\(process\.argv\[1\]\)\.version'/); assert.doesNotMatch(lib, /musrfit-gui|bitbucket\.org\/zaher-salman\/musrfit-gui/); } @@ -64,12 +76,14 @@ function testDocumentationDeployment() { "muSRFitParameterPlot.js", "muSRFitlib.js", "assets/musrflow-favicon.png", "assets/musrflow-icon.png", "cgi/single_musrfit.cgi", "cgi/musrfit_startup.xml"]; for (const file of assets) fs.writeFileSync(path.join(source, file), "fixture\n"); + fs.copyFileSync(path.join(repoRoot, "quick-start.html"), path.join(source, "quick-start.html")); fs.writeFileSync(path.join(source, "package.json"), JSON.stringify({ version: "1.2.3" })); const options = { encoding: "utf8", env: { ...process.env, MUSRFLOW_WEB_TARGET: path.join(target, "web"), MUSRFLOW_CGI_TARGET: path.join(target, "runner.cgi"), MUSRFLOW_STARTUP_XML_TARGET: path.join(target, "startup.xml"), - MUSRFLOW_WEB_OWNER: "", MUSRFLOW_WEB_GROUP: "", MUSRFLOW_DATA_ROOT: "" } }; + MUSRFLOW_WEB_OWNER: "", MUSRFLOW_WEB_GROUP: "", MUSRFLOW_DATA_ROOT: "", + MUSRFIT_BIN: path.join(source, "missing-musrfit") } }; const script = path.join(source, "scripts/deploy-web.sh"); const missing = spawnSync("bash", [script], options); assert.strictEqual(missing.status, 1, missing.stderr); @@ -85,6 +99,11 @@ function testDocumentationDeployment() { const deployed = spawnSync("bash", [script], options); assert.strictEqual(deployed.status, 0, deployed.stderr); assert.match(deployed.stdout, /Installed muSRFlow HTML manual/); + const installedHelp = fs.readFileSync(path.join(target, "web/quick-start.html"), "utf8"); + assert.match(installedHelp, /id="musrflowVersion">1\.2\.3Webunrecorded