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: [
'sh',
'-c',
`set -e; ` +
`rm -rf ${HOST_STATIC}/front && ` +
`mkdir -p ${HOST_STATIC}/front && ` +
`cp -r ${SRC_IN_HELPER}/. ${HOST_STATIC}/front/ && ` +
`echo "copied"; ls -la ${HOST_STATIC}/front | head`,
// Write diagnostics to the host-mounted dir so we can inspect after the run.
`DBG=${HOST_STATIC}/_debug.txt; ` +
`echo "wsSource=${wsSource}" > $DBG; ` +
`echo "--- ls /src/front/dist/prod ---" >> $DBG; ` +
`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"`,
],
};