From 768b40fad20729f3756154d0245ea3f49d998cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A7=E9=A9=8A?= Date: Sat, 21 Nov 2026 10:54:33 +0800 Subject: [PATCH] =?UTF-8?q?make=20update=20=E4=B9=8B=E5=BE=8C=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=99=9F=E9=82=84=E6=98=AF=E8=88=8A=E7=9A=84=EF=BC=9A?= =?UTF-8?q?Makefile=20=E4=B8=80=E9=96=8B=E5=A7=8B=E5=B0=B1=E6=8A=8A?= =?UTF-8?q?=E3=80=8C=E7=8F=BE=E5=9C=A8=E7=9A=84=20commit=E3=80=8D=E6=94=BE?= =?UTF-8?q?=E9=80=B2=20ANYBOT=5FGIT=5FCOMMIT=20=E4=B8=A6=20export=EF=BC=8C?= =?UTF-8?q?deploy/update.sh=20=E4=B9=8B=E5=BE=8C=E6=89=8D=20git=20pull?= =?UTF-8?q?=EF=BC=8C=E6=8E=A5=E8=91=97=E7=B7=A8=E7=9A=84=E7=A8=8B=E5=BC=8F?= =?UTF-8?q?=E6=B2=BF=E7=94=A8=E9=82=A3=E5=80=8B=E8=88=8A=E5=80=BC=E2=80=94?= =?UTF-8?q?=E2=80=94=E7=A8=8B=E5=BC=8F=E6=98=AF=E6=96=B0=E7=9A=84=EF=BC=8C?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=20=E2=80=BA=20=E6=9B=B4=E6=96=B0=E3=80=81--v?= =?UTF-8?q?ersion=E3=80=81=E6=89=8B=E6=A9=9F=E4=B8=8A=E5=AF=AB=E7=9A=84?= =?UTF-8?q?=E5=8D=BB=E6=98=AF=E6=9B=B4=E6=96=B0=E5=89=8D=E7=9A=84=E7=89=88?= =?UTF-8?q?=E6=9C=AC=EF=BC=88Jenny=20=E9=82=A3=E5=8F=B0=2011/21=20?= =?UTF-8?q?=E5=BE=9E=2049055f1=20=E6=9B=B4=E6=96=B0=E5=88=B0=205bf4444?= =?UTF-8?q?=EF=BC=8C--version=20=E9=82=84=E8=AA=AA=2049055f1=EF=BC=9B?= =?UTF-8?q?=E3=80=8C=E5=8D=87=E4=B8=8A=E4=BE=86=E4=B9=8B=E5=BE=8C=E6=80=AA?= =?UTF-8?q?=E6=80=AA=E7=9A=84=E3=80=8D=E4=B9=9F=E8=AE=93=E4=BA=BA=E4=BB=A5?= =?UTF-8?q?=E7=82=BA=E6=B2=92=E6=9B=B4=E6=96=B0=E5=88=B0=EF=BC=89=E3=80=82?= =?UTF-8?q?update.sh=20=E4=B8=80=E9=96=8B=E9=A0=AD=E5=B0=B1=E6=B8=85?= =?UTF-8?q?=E6=8E=89=E5=AE=83=EF=BC=8C=E7=B7=A8=E8=AD=AF=E6=99=82=E7=85=A7?= =?UTF-8?q?=E6=96=B0=E7=9A=84=20HEAD=20=E9=87=8D=E7=AE=97=EF=BC=9B?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=A8=8B=E5=BC=8F=E6=9C=AC=E8=BA=AB=E6=9C=89?= =?UTF-8?q?=E6=94=B9=E3=80=81=E7=94=A8=E6=96=B0=E7=89=88=E9=87=8D=E8=B7=91?= =?UTF-8?q?=E8=87=AA=E5=B7=B1=E6=99=82=E4=B8=80=E6=A8=A3=E6=B8=85=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 已驗證: sh -n、make lint-sh(update.sh 乾淨;剩下的 6 處是 migrate-relay.sh 原本就有的);在 jenny-Host 實際看到問題(新程式裡有新的字串、--version 是舊 commit)。 未驗證: 修好之後的 make update 還沒在實機跑一次(下一次更新 Jenny 那台時看 --version)。 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Uirha2uBHmbnuWBhNzjbJm --- deploy/update.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deploy/update.sh b/deploy/update.sh index 933e293..05d026b 100755 --- a/deploy/update.sh +++ b/deploy/update.sh @@ -16,6 +16,10 @@ ROOT=$(pwd) MAKE=${MAKE:-make} PULL=${PULL:-1} WHAT=${1:-auto} +# `make update` exported the commit it started on (the Makefile's ANYBOT_GIT_COMMIT, read before +# the pull below): left there, the program built after the pull says it is the old version. The +# build works it out again (also when this script runs again as its newer self). +unset ANYBOT_GIT_COMMIT if [ -t 1 ]; then B=$(printf '\033[1m'); D=$(printf '\033[90m'); G=$(printf '\033[32m'); Y=$(printf '\033[33m'); R=$(printf '\033[31m'); C=$(printf '\033[36m'); N=$(printf '\033[0m') else B=; D=; G=; Y=; R=; C=; N=; fi