zotero/app/scripts
Dan Stillman 094d5cc2b6
Update staged builds in place for faster dev builds (#5994)
After a full build, dir_build saves a manifest of build/ files to
staging/.build-manifest. On subsequent runs, if all changed files are
ones that build.sh copies into omni.ja unmodified (chrome/, components/,
resource/, and test/ when tests are staged), zip just those files into
the staged omni.ja instead of rebuilding, taking rebuilds from ~15
seconds to ~0.3 seconds on an M1 Mac. Files are prescreened by size and
mtime so that only changed files need to be hashed. Zotero .ftl files
are also updated at their localization/<locale>/ paths, and test files
are also copied to the staged tests/ directory.

Any other change triggers an automatic full rebuild: files transformed
by build.sh (defaults/, chrome.manifest, version, translators/, styles/,
mozilla .ftl files, CSL locales), removed files, changes to build inputs
in app/ (detected via a size/mtime fingerprint, with xulrunner runtimes
covered by the hash-* files written by fetch_xulrunner), or requesting
tests or devtools that the staged build doesn't include.

Other changes:

- dir_build no longer takes -q and always skips omni.ja compression and
  optimization, which only matter for distribution builds made via
  build.sh. Use -f (dir_build or build_and_run) to force a full rebuild.
- build_and_run now always rebuilds. -r is deprecated, and -n skips the
  rebuild and just launches the app.
- build_and_run no longer passes -purgecaches. Startup caches are
  invalidated automatically when the BuildID changes, which now happens
  whenever omni.ja is modified (including via add_omni_file), so
  relaunching an unchanged build can use the startup cache.
- build_and_run and runtests.sh invoke js-build directly instead of via
  'npm run', which saves ~270ms of npm overhead per build.
- The Word integration dylib is now ad-hoc-signed by dir_build, and only
  on full rebuilds, since incremental updates don't invalidate the
  existing signature. This also covers test builds, which were never
  signed before.
- dir_build removes broken symlinks left in build/ when source files are
  deleted, which previously broke rsync in prepare_build.
2026-07-08 10:07:58 -04:00
..
8.0_release_build_and_deploy Separate build and deploy for release scripts 2026-04-09 11:37:05 -04:00
9.0_release_build_and_deploy Switch to 9.0 branch for 9.0 releases 2026-04-10 13:40:13 -04:00
add_omni_file Update staged builds in place for faster dev builds (#5994) 2026-07-08 10:07:58 -04:00
add_version_info Generate changelog link automatically in add_version_info 2023-05-17 04:35:40 -04:00
beta_build_and_deploy Add -b (build-only) flag to beta_build_and_deploy 2026-06-30 17:44:49 -04:00
build_and_run Update staged builds in place for faster dev builds (#5994) 2026-07-08 10:07:58 -04:00
build_for_deploy Support pinned incrementals from deploy server 2026-04-09 14:35:18 -04:00
check_requirements Suggest running git lfs install in check_requirements instructions (#5102) 2025-03-12 06:54:05 -04:00
codesign_local Stop bundling the PDF tools 2023-04-29 07:14:51 -04:00
createprecomplete.py Add Mozilla script to generate precomplete file 2024-07-22 03:05:14 -04:00
dev_build_and_deploy Separate build and deploy for release scripts 2026-04-09 11:37:05 -04:00
dir_build Update staged builds in place for faster dev builds (#5994) 2026-07-08 10:07:58 -04:00
fetch_mar_tools Generate xz MARs for new updater 2023-05-17 04:35:40 -04:00
fetch_rcedit Add zotero-standalone-build repo as app folder 2023-04-26 04:40:22 -04:00
fetch_xulrunner Encrypt API key and WebDAV password using OS keychain (#5897) 2026-06-12 11:16:22 -04:00
get_commit_files Add zotero-standalone-build repo as app folder 2023-04-26 04:40:22 -04:00
get_repo_branch_hash Add zotero-standalone-build repo as app folder 2023-04-26 04:40:22 -04:00
incremental_update Update staged builds in place for faster dev builds (#5994) 2026-07-08 10:07:58 -04:00
manage_incrementals Fix manage_incrementals on Cygwin 2026-04-09 12:32:03 -04:00
notarization_info Switch to notarytool for Mac build notarization 2023-06-19 06:39:39 -04:00
notarization_stapler Add zotero-standalone-build repo as app folder 2023-04-26 04:40:22 -04:00
notarize_mac_app Switch to notarytool for Mac build notarization 2023-06-19 06:39:39 -04:00
optimizejars.py Add zotero-standalone-build repo as app folder 2023-04-26 04:40:22 -04:00
prepare_build Update prepare_build for Python 3.12 (#3865) 2024-03-20 23:51:25 -04:00
test_build_and_deploy Separate build and deploy for release scripts 2026-04-09 11:37:05 -04:00
upload_builds Convert Cygwin paths passed to AWS CLI 2023-05-18 10:51:29 +01:00
utils.sh Update staged builds in place for faster dev builds (#5994) 2026-07-08 10:07:58 -04:00
xulrunner_hash Fix xulrunner_hash to read the hash from openssl output on LibreSSL/macOS 2026-07-01 20:14:30 +02:00