diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/bump-version.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh index 14ead00..2f3acee 100755 --- a/scripts/bump-version.sh +++ b/scripts/bump-version.sh @@ -188,7 +188,9 @@ cmd_audit() { declared_paths+=("$path") done < <(declared_files) - # Grep for the version string + # Grep for the version string, but not inside a longer number such as an + # IP address; a "v" prefix or surrounding quotes still match. + local version_pattern="(^|[^0-9.])${current_version//./\\.}([^0-9]|$)" local found_undeclared=0 while IFS= read -r match; do local match_file @@ -212,7 +214,7 @@ cmd_audit() { fi echo " $match" fi - done < <(grep -rn "${exclude_args[@]}" -F "$current_version" "$REPO_ROOT" 2>/dev/null || true) + done < <(grep -rnE "${exclude_args[@]}" "$version_pattern" "$REPO_ROOT" 2>/dev/null || true) if [[ "$found_undeclared" -eq 0 ]]; then echo "No undeclared files contain the version string. All clear." |
