Skip to content

Commit b7c0cdc

Browse files
GaroRobeArtem Ponomarevkamilsa
authored
Sed fix for macos (#1323)
Co-authored-by: Artem Ponomarev <[email protected]> Co-authored-by: kamilsa <[email protected]>
1 parent 598503c commit b7c0cdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

get_version.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ if [ -x "$(which git 2>/dev/null)" ] && [ -d ".git" ]; then
2020
DESCR=$HEAD-0-g$HEAD
2121
fi
2222

23-
TAG_IN_MASTER=$(echo $DESCR | sed "s/v\?\(.*\)-\([0-9]\+\)\-g\w\+/\1/")
24-
TAG_TO_FORK_DISTANCE=$(echo $DESCR | sed "s/\(.*\)-\([0-9]\+\)\-g\w\+/\2/")
23+
TAG_IN_MASTER=$(echo $DESCR | sed -E "s/v?(.*)-([0-9]+)-g[a-f0-9]+/\1/")
24+
TAG_TO_FORK_DISTANCE=$(echo $DESCR | sed -E "s/v?(.*)-([0-9]+)-g[a-f0-9]+/\2/")
2525

2626
BRANCH=$(git branch --show-current)
2727
if [ "$BRANCH" = "" ]; then

0 commit comments

Comments
 (0)