buildUpdateScript
buildUpdateScript(
logPath,from?,to?):string
Defined in: src/herdr-update.ts:56
The shell program shepherd spawns as a managed child. Extracted + exported so its sequencing is unit-testable without a live herdr release.
Two guarantees:
-
Every run appends ONE delimited block to
logPath(default ~/.shepherd/herdr-update.log) viatee -a: a=== herdr-update <UTC> <from> -> <to> ===header, each step marker, rawherdr updateoutput, and the exit code. The script writes this file itself so the record is COMPLETE even if shepherd crashes mid-update. -
Each step echoes a
UPDATE_LOG_PREFIXmarker BEFORE it runs, and theherdr updateexit code is echoed explicitly.
Shepherd stays up during the update (no restart), so it captures this
script’s stdout live for the modal. The tee -a keeps a durable post-mortem.
Parameters
Section titled “Parameters”logPath
Section titled “logPath”string
string | null
string | null
Returns
Section titled “Returns”string