File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -103,12 +103,13 @@ function github_get_libs_idf(){ # github_get_libs_idf <repo-path> <branch-name>
103
103
local repo_path=" $1 "
104
104
local branch_name=" $2 "
105
105
local message_prefix=" $3 "
106
+ message_prefix=$( echo $message_prefix | sed ' s/[]\/$*.^|[]/\\&/g' ) # Escape special characters
106
107
local page=1
107
108
local version_found=" "
108
109
local libs_version=" "
109
110
110
111
while [ " $libs_version " == " " ]; do
111
- version_found=` curl -s -k -H " Authorization: token $GITHUB_TOKEN " -H " Accept: application/vnd.github.v3.raw+json" " https://api.github.com/repos/$repo_path /commits?sha=$branch_name &per_page=100&page=$page " | jq -r ' .[].commit.message' | grep -E " $message_prefix [a-f0-9]{8}$ " | awk ' NR==1{print $NF}' `
112
+ version_found=` curl -s -k -H " Authorization: token $GITHUB_TOKEN " -H " Accept: application/vnd.github.v3.raw+json" " https://api.github.com/repos/$repo_path /commits?sha=$branch_name &per_page=100&page=$page " | jq -r ' .[].commit.message' | grep -Eo " $message_prefix [a-f0-9]{8}" | awk ' NR==1{print $NF}' `
112
113
if [ ! " $version_found " == " " ] && [ ! " $version_found " == " null" ]; then
113
114
libs_version=$version_found
114
115
else
You can’t perform that action at this time.
0 commit comments