diff --git a/scripts/deploy-web.sh b/scripts/deploy-web.sh index 844b572..ad8f982 100755 --- a/scripts/deploy-web.sh +++ b/scripts/deploy-web.sh @@ -12,6 +12,7 @@ cgi_target="${MUSRFLOW_CGI_TARGET:-/var/www/cgi-bin/single_musrfit.cgi}" # outside the web document root so it is never served to browsers. startup_target="${MUSRFLOW_STARTUP_XML_TARGET:-/var/www/cgi-bin/musrfit_startup.xml}" docs_source="$project_root/docs/_build/html" +model_index_source="$project_root/assets/model-recommender.js" # Build as the normal user beforehand, not inside a possibly privileged deploy. # Check before changing the installed application so missing docs fail cleanly. @@ -19,6 +20,10 @@ if [ ! -s "$docs_source/index.html" ]; then printf 'HTML manual missing. Run make -C "%s/docs" html before deploying.\n' "$project_root" >&2 exit 1 fi +if [ ! -s "$model_index_source" ]; then + printf 'Fit recommendation index missing: %s\n' "$model_index_source" >&2 + exit 1 +fi # Install only assets used by the browser build. Parameter plotting and ROOT # rendering are loaded as separate browser modules. @@ -35,6 +40,7 @@ install -m 0644 \ install -m 0644 \ "$project_root/assets/musrflow-favicon.png" \ "$project_root/assets/musrflow-icon.png" \ + "$model_index_source" \ "$web_target/assets/" # Copy the entire Sphinx site, including search data, styles, and source links. diff --git a/tests/help-window.test.js b/tests/help-window.test.js index 589639f..88b1d01 100644 --- a/tests/help-window.test.js +++ b/tests/help-window.test.js @@ -74,6 +74,7 @@ function testDocumentationDeployment() { fs.copyFileSync(path.join(repoRoot, "scripts/deploy-web.sh"), path.join(source, "scripts/deploy-web.sh")); const assets = ["index.html", "quick-start.html", "ZGUI.css", "muSRFitweb.js", "muSRFitRoot.js", "muSRFitParameterPlot.js", "muSRFitlib.js", "assets/musrflow-favicon.png", "assets/musrflow-icon.png", + "assets/model-recommender.js", "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")); @@ -105,6 +106,10 @@ function testDocumentationDeployment() { assert.match(installedHelp, /id="musrflowEdition">Webbbbbbbbbbbbb