Skip to content

Commit

Permalink
Fix branch name checker for automatic codegen script (#1980)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8d5e75d)
  • Loading branch information
JoshMock authored and github-actions[bot] committed Aug 22, 2023
1 parent 471c6d1 commit 56fab46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .ci/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ case $CMD in
if [ -v "$VERSION" ] || [[ -z "$VERSION" ]]; then
# fall back to branch name or `main` if no VERSION is set
branch_name=$(git rev-parse --abbrev-ref HEAD)
if [[ "$branch_name" =~ ^\d+\.\d+ ]]; then
echo -e "\033[36;1mTARGET: codegen -> No VERSION found, using branch name: \`$VERSION\`\033[0m"
if [[ "$branch_name" =~ ^[0-9]+\.[0-9]+ ]]; then
echo -e "\033[36;1mTARGET: codegen -> No VERSION argument found, using branch name: \`$branch_name\`\033[0m"
VERSION="$branch_name"
else
echo -e "\033[36;1mTARGET: codegen -> No VERSION found, using \`main\`\033[0m"
echo -e "\033[36;1mTARGET: codegen -> No VERSION argument found, using \`main\`\033[0m"
VERSION="main"
fi
fi
Expand Down

0 comments on commit 56fab46

Please sign in to comment.