Fix triggering the release logic on a branch with release in its name. (#13915)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e6d216090b
Коммит
8f0bedf9c9
@@ -12,7 +12,7 @@ LATEST_REL=$(curl --silent "https://api.github.com/repos/$REPO_TO_USE/releases/l
|
|||||||
# Check if this is a release branch
|
# Check if this is a release branch
|
||||||
THIS_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
THIS_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||||
|
|
||||||
if [[ "$THIS_BRANCH" =~ $BRANCH_TO_USE ]];
|
if [[ $(echo "$THIS_BRANCH" | grep -c ^"$BRANCH_TO_USE") == 1 ]];
|
||||||
then
|
then
|
||||||
VERSION_REL=${THIS_BRANCH//$BRANCH_TO_USE/v}
|
VERSION_REL=${THIS_BRANCH//$BRANCH_TO_USE/v}
|
||||||
REL_TO_USE=$(curl --silent "https://api.github.com/repos/$REPO_TO_USE/releases" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed -n "/$VERSION_REL/p" | sort -rV | head -n 1)
|
REL_TO_USE=$(curl --silent "https://api.github.com/repos/$REPO_TO_USE/releases" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | sed -n "/$VERSION_REL/p" | sort -rV | head -n 1)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user