refactor: check existing tags for relup

Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
This commit is contained in:
Thales Macedo Garitezi 2022-08-18 10:22:58 -03:00 committed by GitHub
parent 257a86a576
commit ca9628342a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

3
build
View File

@ -190,7 +190,8 @@ make_zip() {
esac
## one can only upgrade to 4.5.X from 4.4.8 or later, when that's
## released. Until that's released, there's no relup.
if [[ -z "$(ls -A _upgrade_base 2>/dev/null || true)" && "${PKG_VSN}" == 4.5.0* ]]; then
v44_bases="$(git tag -l "*4.4*" | grep -c -E '4\.4\.([8-9]|1[0-9])' || true)"
if [[ "${v44_bases}" -eq 0 ]]; then
has_relup='no'
fi
if [ "$has_relup" = 'yes' ]; then