Skip to content

Commit a4f04a8

Browse files
committed
Use [0-9] instead of \d in grep
1 parent 02d6184 commit a4f04a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

serverless/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ cd serverless
2626
# echo "After grep: $(grep -o 'Version: \d\+\.\d\+\.\d\+' template.yml)"
2727
# echo "After cut: $(grep -o 'Version: \d\+\.\d\+\.\d\+' template.yml | cut -d' ' -f2)"
2828

29-
# Need -P to use \d, see: https://stackoverflow.com/questions/6901171/is-d-not-supported-by-greps-basic-expressions
30-
CURRENT_VERSION=$(grep -oP 'Version: \d\+\.\d\+\.\d\+' template.yml | cut -d' ' -f2)
29+
# \d may be unsupported. See: https://stackoverflow.com/questions/6901171/is-d-not-supported-by-greps-basic-expressions
30+
CURRENT_VERSION=$(grep -oP 'Version: [0-9]\+\.[0-9]\+\.[0-9]\+' template.yml | cut -d' ' -f2)
3131
echo "Current version is ${CURRENT_VERSION}"
3232

3333
exit 0

0 commit comments

Comments
 (0)