Skip to content

Commit

Permalink
chore(bump_cffu_version.sh): rename var REPLACE_PATTERN -> `SEARC…
Browse files Browse the repository at this point in the history
…H_PATTERN` 🔠
  • Loading branch information
oldratlee committed Feb 17, 2025
1 parent f935e5c commit b960799
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/bump_cffu_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ isValidVersion() {
}

ignoreFailRg() {
rg "$@" || true
cu::log_then_run rg "$@" || true
}

myXargs() {
Expand Down Expand Up @@ -52,9 +52,9 @@ cu::log_then_run sed -i -r \
's#(\s*).*UPDATE to Alpha version WHEN RELEASE.*#\1<version>'"$NEW_ALPHA_VERSION"'</version>#' \
pom.xml ./*/pom.xml ./*/*/pom.xml

REPLACE_PATTERN="$(escapeLiteralForRegex "1.x-SNAPSHOT")|$(escapeLiteralForRegex "$OLD_VERSION")"
readonly REPLACE_PATTERN
SEARCH_PATTERN="$(escapeLiteralForRegex "1.x-SNAPSHOT")|$(escapeLiteralForRegex "$OLD_VERSION")"
readonly SEARCH_PATTERN

ignoreFailRg "$REPLACE_PATTERN" -l -g '!scripts/' |
cu::log_then_run myXargs sed -i -r "s#$REPLACE_PATTERN#$NEW_VERSION#g"
ignoreFailRg "$SEARCH_PATTERN" -l -g '!scripts/' |
myXargs sed -i -r "s#$SEARCH_PATTERN#$NEW_VERSION#g"

0 comments on commit b960799

Please sign in to comment.