Skip to content

Commit a116681

Browse files
authored
fix update version check (#335)
1 parent 1a4bccd commit a116681

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/prepare-for-release

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ update_versions() {
125125
echo -e "🥑 Attempting to update NTH release version in preparation for a new release."
126126

127127
for f in "${FILES[@]}"; do
128-
has_incorrect_version=$(cat $f | grep $PREVIOUS_VERSION)
128+
# do not exit if grep doesn't find $PREVIOUS_VERSION; continue to exit on all other exit codes
129+
has_incorrect_version=$(cat $f | grep $PREVIOUS_VERSION || [[ $? == 1 ]])
129130
if [[ ! -z $has_incorrect_version ]]; then
130131
sed -i '' "s/$PREVIOUS_VERSION/$LATEST_VERSION/g" $f
131132
FILES_CHANGED+=("$f")

0 commit comments

Comments
 (0)