build: Fix updating 'go.etcd.io/etcd/api/v3/version.GitSHA' + test (#12382)
During move of code to 'api' (0aab02e7b5
),
I overlooked that the ./build script is setting the version on the 'symbol'.
I added a code to ./build script that checks whether the symbol's are in sync.
This commit is contained in:
@ -59,14 +59,19 @@ function pkgs_in_module {
|
||||
# the test.
|
||||
function run {
|
||||
local rpath
|
||||
local command
|
||||
rpath=$(realpath "--relative-to=${ETCD_ROOT_DIR}" "${PWD}")
|
||||
local repro="$*"
|
||||
# Quoting all components as the commands are fully copy-parsable:
|
||||
command=("${@}")
|
||||
command=("${command[@]@Q}")
|
||||
if [ "${rpath}" != "." ]; then
|
||||
repro="(cd ${rpath} && ${repro})"
|
||||
repro="(cd ${rpath} && ${command[*]})"
|
||||
else
|
||||
repro="${command[*]}"
|
||||
fi
|
||||
|
||||
log_callout "% ${repro}"
|
||||
"${@}"
|
||||
"${@}" 2> >(while read -r line; do echo -e "\e[01;31m$line\e[0m" >&2; done)
|
||||
local error_code=$?
|
||||
if [ ${error_code} -ne 0 ]; then
|
||||
log_error -e "FAIL: (code:${error_code}):\n % ${repro}"
|
||||
|
Reference in New Issue
Block a user