dist: make check-tag.sh print more useful info for invalid tag

Upstream: no

Invalid tag can still build, just it can't make a release. So print more
useful info for such tag.

Signed-off-by: Kairui Song <kasong@tencent.com>
This commit is contained in:
Kairui Song 2023-01-03 01:40:48 +08:00
parent e75a45b829
commit 21f4af81e5
1 changed files with 2 additions and 2 deletions

View File

@ -12,8 +12,8 @@ prepare_kernel_ver "$@"
# If tag is not recognized, prepare_kernel_ver will version it as snapshot
# use this as an indicator of invalid tag
if ! [[ $KTAGRELEASE ]]; then
error "Invalid tag '$1'"
warn "Invalid tag, will override with Kernel uname-r '$KERNEL_UNAMER', RPM NVR version '${KERNEL_NAME}-${KERNEL_MAJVER}-${KERNEL_RELVER}'"
exit 1
else
info "Tag '$KTAGRELEASE' OK, Kernel version '$KERNEL_UNAMER', RPM version '${KERNEL_MAJVER//-/.}-${KERNEL_RELVER//-/.}'"
info "Tag '$KTAGRELEASE' OK, Kernel uname-r '$KERNEL_UNAMER', RPM NVR version '${KERNEL_NAME}-${KERNEL_MAJVER}-${KERNEL_RELVER}'"
fi