[script] allow specify old commit for check-size (#11147)

This commit is contained in:
Yakun Xu
2025-01-11 01:41:56 +08:00
committed by GitHub
parent 0e16655211
commit 7bd3abd67b

View File

@ -35,7 +35,7 @@ readonly OT_TMP_DIR
OT_SHA_NEW=${GITHUB_SHA:-$(git rev-parse HEAD)}
readonly OT_SHA_NEW
OT_SHA_OLD="$(git cat-file -p "${OT_SHA_NEW}" | grep 'parent ' | head -n1 | cut -d' ' -f2)"
OT_SHA_OLD="${OT_SHA_OLD:-$(git cat-file -p "${OT_SHA_NEW}" | grep 'parent ' | head -n1 | cut -d' ' -f2)}"
readonly OT_SHA_OLD
OT_REPORT_FILE_TABLE="${OT_TMP_DIR}/report_table"