hermes-agent/apps/desktop/scripts
Austin Pickett bc6839aa37
fix(desktop): stop hard-failing pack on non-git checkouts + fix ZIP-path autocrlf (supersedes #67643) (#67730)
* fix(desktop): allow write-build-stamp from non-git checkouts

Stop hard-failing npm pack when neither GITHUB_SHA nor git HEAD is
available (ZIP installs / broken .git). Emit an explicit fallback stamp
instead so local Windows desktop builds can finish (#50823).

* fix(desktop): treat fallback stamps as unpinned; harden Windows install

Keep all-zero fallback commits out of -Commit/--commit pins and fetch
install.ps1 by branch instead. After bootstrap, pin the marker to the
checkout HEAD so isBootstrapComplete accepts it. On Windows, force ZIP
checkout, seed GITHUB_SHA (ASCII-only install.ps1), and avoid the pack
stamp failure.

* fix(install): pin core.autocrlf=false before ZIP-path checkout (#50823 review)

The ZIP-fallback path added in #67643 runs `git checkout -f FETCH_HEAD`
before core.autocrlf gets pinned (which only happened later, on the
shared clone-path config). On Git for Windows -- where core.autocrlf
defaults to true -- that renormalizes the repo's LF text files to CRLF in
the working tree during checkout, leaving the freshly-created managed
checkout dirty versus HEAD and aborting the next `hermes update`. That is
the exact "dirty tree the user never touched" failure the surrounding
code already guards against (install.ps1:1461-1469, 1750-1753).

Move the `config core.autocrlf false` pin to run immediately after
`git init`, before the fetch/checkout. The later idempotent pin on the
shared clone path is retained so git-clone installs are unaffected.

Addresses teknium1's review on #67643 and supersedes it, preserving the
original author's two commits.

Co-authored-by: HexLab98 <8422520+HexLab98@users.noreply.github.com>

* chore(contributors): map austinpickett commit email for attribution

The check-attribution CI gate flagged austinpickett@users.noreply.github.com
as an unmapped commit-author email (introduced by the autocrlf fix commit
on this PR). Add the per-email mapping file as the gate instructs (the
legacy AUTHOR_MAP in scripts/release.py is frozen).

---------

Co-authored-by: HexLab98 <liruixinch@outlook.com>
Co-authored-by: austinpickett <austinpickett@users.noreply.github.com>
Co-authored-by: HexLab98 <8422520+HexLab98@users.noreply.github.com>
2026-07-19 19:29:36 -04:00
..
perf bench(desktop): measure representative (warm-cache) cold start (#67733) 2026-07-19 23:21:45 +00:00
.gitignore feat(desktop): Memory Graph — playable radial timeline of memories + skills 2026-06-30 00:54:21 -05:00
after-pack.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
assert-dist-built.mjs cleanup(desktop): remove 'use strict' in ts & mjs 2026-07-13 17:22:17 -04:00
assert-dist-built.test.mjs test(desktop): run scripts/ tests in vitest 2026-07-13 17:22:17 -04:00
assert-root-install.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
before-build.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
before-pack.mjs cleanup(desktop): remove 'use strict' in ts & mjs 2026-07-13 17:22:17 -04:00
before-pack.test.mjs test(desktop): run scripts/ tests in vitest 2026-07-13 17:22:17 -04:00
bundle-electron-main.mjs fix(desktop): stop using tsx to boot Electron main in dev 2026-07-08 22:40:51 -05:00
click-session.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
dev-no-hmr.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
diag-jump.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
diag-scroll-reset.mjs fix(desktop): stop chat scroll jumping by disabling native scroll anchoring 2026-06-02 23:08:01 -05:00
eval.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
gen-share-codes.ts feat(desktop): Memory Graph — playable radial timeline of memories + skills 2026-06-30 00:54:21 -05:00
notarize-artifact.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
notarize.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
patch-electron-builder-mac-binary.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
probe-renderer.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
probe-thread.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
profile-typing-lag.md bench(desktop): systematized perf harness; sunset 12 one-off scripts (#67466) 2026-07-19 07:41:00 -04:00
rebuild-native.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
reload-renderer.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
reload.mjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
run-electron-builder.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
set-exe-identity.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
stage-native-deps.mjs fix(desktop): preserve node-pty helper in packaged app (#65611) 2026-07-16 11:58:50 +00:00
stage-native-deps.test.mjs fix(desktop): preserve node-pty helper in packaged app (#65611) 2026-07-16 11:58:50 +00:00
test-desktop.mjs change(ci/desktop): move desktop app build into check job 2026-07-13 17:22:17 -04:00
utils.mjs feat(desktop): ts-ify everything 2026-07-08 16:24:16 -07:00
write-build-stamp.mjs fix(desktop): stop hard-failing pack on non-git checkouts + fix ZIP-path autocrlf (supersedes #67643) (#67730) 2026-07-19 19:29:36 -04:00
write-build-stamp.test.mjs fix(desktop): stop hard-failing pack on non-git checkouts + fix ZIP-path autocrlf (supersedes #67643) (#67730) 2026-07-19 19:29:36 -04:00