Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions release_files/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ get_release() {
fi
if [ -n "$GITHUB_TOKEN" ]; then
curl -H "Authorization: token ${GITHUB_TOKEN}" -s "${URL}" \
| grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
| grep '"tag_name":' | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+'
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern v[0-9]+\.[0-9]+\.[0-9]+ only matches versions with exactly three numeric segments (e.g., v1.2.3) but will fail to match versions with pre-release identifiers (e.g., v1.2.3-rc1, v1.2.3-beta) or additional segments (e.g., v1.2.3.4). Consider using a more flexible pattern like v[0-9]+\.[0-9]+\.[0-9]+[^\"]* or reverting to the sed approach which captures the entire tag name.

Copilot uses AI. Check for mistakes.
else
curl -s "${URL}" \
| grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
| grep '"tag_name":' | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+'
fi
}

Expand Down
Loading