make update 之後版本號還是舊的:Makefile 一開始就把「現在的 commit」放進 ANYBOT_GIT_COMMIT 並 export,deploy/update.sh 之後才 git pull,接著編的程式沿用那個舊值——程式是新的,設定 › 更新、--version、手機上寫的卻是更新前的版本(Jenny 那台 11/21 從 49055f1 更新到 5bf4444,--version 還說 49055f1;「升上來之後怪怪的」也讓人以為沒更新到)。update.sh 一開頭就清掉它,編譯時照新的 HEAD 重算;更新程式本身有改、用新版重跑自己時一樣清。
已驗證: 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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uirha2uBHmbnuWBhNzjbJm
This commit is contained in:
parent
5bf44448bb
commit
768b40fad2
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue