Skip to content

Commit f848e13

Browse files
committed
update grep command
1 parent 69e90c3 commit f848e13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/updateCmakeVersion.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525

2626
- name: Compare Version
2727
run: |
28-
version1=$(grep -oP '(?<=project\([^\)]+\sVERSION\s)[^\)]+(?=\))' /master/CMakeLists.txt)
29-
version2=$(grep -oP '(?<=project\([^\)]+\sVERSION\s)[^\)]+(?=\))' /current/CMakeLists.txt)
28+
version1=$(grep -oP 'project\(\s*[\w-]+\s+VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' master/CMakeLists.txt)
29+
version2=$(grep -oP 'project\(\s*[\w-]+\s+VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' current/CMakeLists.txt)
3030
echo $version1
3131
echo $version2
3232

0 commit comments

Comments
 (0)