Skip to content

Commit f0ba74e

Browse files
committed
Merge branch 'master' into release/v5.1
2 parents 987058d + f774de8 commit f0ba74e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/config.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,13 @@ function github_get_libs_idf(){ # github_get_libs_idf <repo-path> <branch-name>
103103
local repo_path="$1"
104104
local branch_name="$2"
105105
local message_prefix="$3"
106+
message_prefix=$(echo $message_prefix | sed 's/[]\/$*.^|[]/\\&/g') # Escape special characters
106107
local page=1
107108
local version_found=""
108109
local libs_version=""
109110

110111
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}'`
112113
if [ ! "$version_found" == "" ] && [ ! "$version_found" == "null" ]; then
113114
libs_version=$version_found
114115
else

0 commit comments

Comments
 (0)