Skip to content

Commit 46ddb88

Browse files
committed
compare versions
1 parent f848e13 commit 46ddb88

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/updateCmakeVersion.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@ jobs:
1616
uses: actions/checkout@v4
1717
with:
1818
path: master
19-
ref: ''
19+
ref: 'master'
2020

2121
- name: Check out current
2222
uses: actions/checkout@v4
2323
with:
24-
path: current
24+
path: branch
2525

2626
- name: Compare Version
2727
run: |
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)
30-
echo $version1
31-
echo $version2
28+
masterVersion=$(grep -oP 'project\(\s*[\w-]+\s+VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' master/CMakeLists.txt)
29+
branchVersion=$(grep -oP 'project\(\s*[\w-]+\s+VERSION\s+\K[0-9]+\.[0-9]+\.[0-9]+' branch/CMakeLists.txt)
30+
[ "$masterVersion" != "$branchVersion" ]
3231

0 commit comments

Comments
 (0)