Skip to content

Commit

Permalink
[COPR] tighten grep to avoid catching some random stuff
Browse files Browse the repository at this point in the history
Signed-off-by: Przemo Firszt <[email protected]>
  • Loading branch information
PrzemoF authored and wwmayer committed Feb 17, 2023
1 parent c48b426 commit 5d8c247
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpkg.macros
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function git_commit_no {
commits=$(curl -s 'https://api.github.com/repos/FreeCAD/FreeCAD/compare/120ca87015...master' | grep "ahead_by" | sed -s 's/ //g' | sed -s 's/"ahead_by"://' | sed -s 's/,//')
commits=$(curl -s 'https://api.github.com/repos/FreeCAD/FreeCAD/compare/120ca87015...master' | grep "\"ahead_by\":" | sed -s 's/ //g' | sed -s 's/"ahead_by"://' | sed -s 's/,//')
echo -n $((commits + 1))
}

0 comments on commit 5d8c247

Please sign in to comment.