Merge pull request #7404 from zmstone/ci-4.4-exclude-base-vsn-before-4.4.2-for-debian11

This commit is contained in:
zhouzb 2022-03-25 08:29:54 +08:00 committed by GitHub
commit 1d6b7bbeae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 1 deletions

View File

@ -58,6 +58,9 @@ case "${EDITION}" in
;;
esac
# must not be empty for MacOS (bash 3.x)
TAGS=( 'dummy' )
TAGS_EXCLUDE=( 'dummy' )
while read -r git_tag; do
# shellcheck disable=SC2207
semver=($(parse_semver "$git_tag"))
@ -68,7 +71,25 @@ while read -r git_tag; do
# because current version is not an upgrade base
true
else
echo "$git_tag"
TAGS+=( "$git_tag" )
fi
fi
done < <(git tag -l "${GIT_TAG_PREFIX}${CUR_SEMVER[0]}.${CUR_SEMVER[1]}.*")
# debian11 is introduced since v4.4.2 and e4.4.2
# exclude tags before them
SYSTEM="${SYSTEM:-$(./scripts/get-distro.sh)}"
if [ "$SYSTEM" = 'debian11' ]; then
TAGS_EXCLUDE+=( 'v4.4.0' 'v4.4.1' )
TAGS_EXCLUDE+=( 'e4.4.0' 'e4.4.1' )
fi
for tag_to_del in "${TAGS_EXCLUDE[@]}"; do
TAGS=( "${TAGS[@]/$tag_to_del}" )
done
for tag in "${TAGS[@]}"; do
if [ "$tag" != '' ]; then
echo "$tag"
fi
done