debug(deploy): write helper diagnostics to host _debug.txt

This commit is contained in:
chenxing
2026-08-04 22:53:41 +08:00
parent 1aef90eff5
commit 1619e41c20
+11 -5
View File
@@ -80,11 +80,17 @@ async function main() {
Cmd: [ Cmd: [
'sh', 'sh',
'-c', '-c',
`set -e; ` + // Write diagnostics to the host-mounted dir so we can inspect after the run.
`rm -rf ${HOST_STATIC}/front && ` + `DBG=${HOST_STATIC}/_debug.txt; ` +
`mkdir -p ${HOST_STATIC}/front && ` + `echo "wsSource=${wsSource}" > $DBG; ` +
`cp -r ${SRC_IN_HELPER}/. ${HOST_STATIC}/front/ && ` + `echo "--- ls /src/front/dist/prod ---" >> $DBG; ` +
`echo "copied"; ls -la ${HOST_STATIC}/front | head`, `ls -la ${SRC_IN_HELPER} >> $DBG 2>&1; ` +
`echo "src file count: $(find ${SRC_IN_HELPER} -type f 2>/dev/null | wc -l)" >> $DBG; ` +
`set -e; ` +
`rm -rf ${HOST_STATIC}/front && mkdir -p ${HOST_STATIC}/front && ` +
`cp -r ${SRC_IN_HELPER}/. ${HOST_STATIC}/front/ 2>> $DBG; ` +
`echo "dest file count: $(find ${HOST_STATIC}/front -type f 2>/dev/null | wc -l)" >> $DBG; ` +
`echo "copied"`,
], ],
}; };