chore(ops): write the deploy plan before truncating it
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8ffae729cc
commit
db558990a0
1 file changed
+4
-1
+4
-1
@@ -117,7 +117,10 @@ if [ -n "$DRY_RUN" ]; then
|
||||
rsync -ain --delete --rsync-path="sudo rsync" \
|
||||
--exclude 'run.sh' --exclude 'entrypoint.sh' \
|
||||
--exclude 'nginx.conf' --exclude 'redis.conf' \
|
||||
"$STAGE/" "$HOST:$REMOTE_DIR/" | tee /tmp/homarr-deploy-plan.txt | head -30
|
||||
"$STAGE/" "$HOST:$REMOTE_DIR/" > /tmp/homarr-deploy-plan.txt
|
||||
# Écrit d'abord, tronqué ensuite : un `| head` ferme le tuyau et rsync s'arrête
|
||||
# sur SIGPIPE au bout de trente lignes, ce qui donnerait un plan mensonger.
|
||||
head -30 /tmp/homarr-deploy-plan.txt
|
||||
echo
|
||||
echo "$(grep -c '^\*deleting' /tmp/homarr-deploy-plan.txt) suppressions, \
|
||||
$(grep -vc '^\*deleting' /tmp/homarr-deploy-plan.txt) écritures. Plan complet : /tmp/homarr-deploy-plan.txt"
|
||||
|
||||
Reference in new issue
Block a user