fix: lint_version CI job to let pre-release versions match VERSION
MODIFY
.circleci/config.yml
.circleci/config.yml
@@ -199,11 +199,11 @@ jobs:
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
- _tagged_version="${CIRCLE_TAG#*v}"
+ _tagged_version_ignoring_pre="${${CIRCLE_TAG#*v}%%-pre.*}"
_filed_version="$(head -n 1 ./VERSION | sed 's/^[ \t]*//;s/[ \t]*$//')"
- if [ "$_tagged_version" != "$_filed_version" ]; then
- echo "The git tag \"${CIRCLE_TAG}\" expects the VERSION to be \"${_tagged_version}\". Got \"${_filed_version}\"."
+ if [ "$_tagged_version_ignoring_pre" != "$_filed_version" ]; then
+ echo "The git tag \"${CIRCLE_TAG}\" expects the VERSION to be \"${_tagged_version_ignoring_pre}\". Got \"${_filed_version}\"."
exit 1
fi
else

fix: lint_version CI job to let pre-release versions match VERSION (#1443)