Skip to content

Commit efe4895

Browse files
committed
chore: update validation script for env var annotations
1 parent 5d99688 commit efe4895

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.make/check-env-var-annotations.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#
66
# valid examples:
77
#
8+
# introductionVersion:"%%NEXT%%"
89
# introductionVersion:"pre5.0"
910
# introductionVersion:"5.0"
1011
# introductionVersion:"4.9.3-rc5"
@@ -24,7 +25,7 @@ ERROR=0
2425

2526
SEMVER_REGEX="([0-9]|[1-9][0-9]*)(\.([0-9]|[1-9][0-9]*)){1,2}(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?"
2627

27-
QUERY_INTRO=$(git grep -n "env:" -- '*.go' |grep -v -P "introductionVersion:\"($SEMVER_REGEX|(pre5\.0))\""|grep -v "_test.go"|grep -v "vendor/")
28+
QUERY_INTRO=$(git grep -n "env:" -- '*.go' |grep -v -P "introductionVersion:\"($SEMVER_REGEX|(pre5\.0)|(%%NEXT%%))\""|grep -v "_test.go"|grep -v "vendor/")
2829
RESULTS_INTRO=$(echo "${QUERY_INTRO}"|wc -l)
2930
if [ "${QUERY_INTRO}" != "" ] && [ "${RESULTS_INTRO}" -gt 0 ]; then
3031
echo "==============================================================================================="

0 commit comments

Comments
 (0)