@@ -108,14 +108,27 @@ if [ ! -f "$MOCK_SERVER" ]; then
108108 exit 1
109109fi
110110
111- echo " [setup] Zed binary: $ZED_BINARY "
112- echo " [setup] md5: $( md5sum " $ZED_BINARY " 2> /dev/null | cut -c1-32) "
113- echo " [setup] size: $( stat -c ' %s' " $ZED_BINARY " 2> /dev/null) bytes"
114- echo " [setup] mtime: $( stat -c ' %y' " $ZED_BINARY " 2> /dev/null | cut -d. -f1) "
115- echo " [setup] ThreadLoadError in source (expected 1): $( strings " $ZED_BINARY " | grep -c ' ThreadLoadError' 2> /dev/null || echo unknown) "
116- echo " [setup] 'creating new thread as fallback' present: $( strings " $ZED_BINARY " | grep -c ' creating new thread as fallback' 2> /dev/null || echo unknown) "
117- echo " [setup] Mock server: $MOCK_SERVER "
118- echo " [setup] md5: $( md5sum " $MOCK_SERVER " 2> /dev/null | cut -c1-32) "
111+ echo " "
112+ echo " ============================================"
113+ echo " BINARY VERSIONS"
114+ echo " ============================================"
115+ # Extract the ZED_COMMIT_SHA baked into the binary at compile time (set via
116+ # .drone.yml: export ZED_COMMIT_SHA=$(git rev-parse HEAD)). This is the
117+ # definitive proof of what source the binary was built from.
118+ # The sha is a 40-char hex string embedded as a string literal.
119+ ZED_BUILT_SHA=$( strings " $ZED_BINARY " 2> /dev/null | grep -oP ' (?<=starting zed version [^,]*, sha )[0-9a-f]{40}' || true)
120+ if [ -z " $ZED_BUILT_SHA " ]; then
121+ # Fallback: find any 40-char hex that looks like a git sha
122+ ZED_BUILT_SHA=$( strings " $ZED_BINARY " 2> /dev/null | grep -oE ' \b[0-9a-f]{40}\b' | head -1 || true)
123+ fi
124+ echo " Zed binary: $ZED_BINARY "
125+ echo " Zed commit SHA: ${ZED_BUILT_SHA:- NOT BAKED IN (local dev build?)} "
126+ echo " Zed md5: $( md5sum " $ZED_BINARY " 2> /dev/null | cut -c1-32) "
127+ echo " Zed size: $( stat -c ' %s' " $ZED_BINARY " 2> /dev/null) bytes"
128+ echo " Go test server: $MOCK_SERVER "
129+ echo " Go server md5: $( md5sum " $MOCK_SERVER " 2> /dev/null | cut -c1-32) "
130+ echo " ============================================"
131+ echo " "
119132
120133echo " [setup] Zed binary: $ZED_BINARY "
121134echo " [setup] Mock server: $MOCK_SERVER "
0 commit comments