Skip to content

Commit 1793370

Browse files
authored
refactor: fix release guides minor double quotes in yml (#2135)
1 parent 6fa07d5 commit 1793370

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/create-new-minor-version

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ read -n 1 -s -r -p "Press any key to continue"
4040
# `-d "."` specifies `.` as the delimiter.
4141
# `-f N` specifies which of the delimited sections to keep
4242
# `cut -c 2-` gets rid of the "v" prefix by selecting from the second character onwards.
43-
CURRENT_VERSION=$(grep "currentVersion" guides/versions.yml | sed "s/currentVersion.*\(v.*\)\"/\1/")
43+
CURRENT_VERSION=$(grep "currentVersion" guides/versions.yml | sed "s/currentVersion: \(v.*\)/\1/")
4444
MAJOR_VERSION=$(echo $CURRENT_VERSION | cut -d "." -f 1 | cut -c 2-)
4545
MINOR_VERSION=$(echo $CURRENT_VERSION | cut -d "." -f 2)
4646
PATCH_VERSION=$(echo $CURRENT_VERSION | cut -d "." -f 3)
@@ -62,9 +62,9 @@ echo " DONE"
6262
# Then we interpolate the new version and replace the closing double quote.
6363
# We also add the relevant version to the list by using sed's i command.
6464
echo "🤖 Updating /guides/versions.yml"
65-
sed -i .bak "s/\(currentVersion:.*v\).*/\1$(echo $NEXT_VERSION)\"/" guides/versions.yml
65+
sed -i .bak "s/\(currentVersion:.*v\).*/\1$(echo $NEXT_VERSION)/" guides/versions.yml
6666
sed -i .bak -e "/currentVersion/i \\
67-
\ \ - \"v$(echo $NEXT_VERSION)\"" guides/versions.yml
67+
\ \ - v$(echo $NEXT_VERSION)" guides/versions.yml
6868
rm guides/versions.yml.bak
6969
echo " DONE"
7070

0 commit comments

Comments
 (0)