File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040echo " Detected Platform: $OS /$ARCH "
4141
4242# Get latest release tag
43- LATEST_TAG=$( curl -s " https://api.github.com/repos/$REPO /releases/latest" | grep ' "tag_name":' | head -n 1 | sed -E ' s/.*"([^"]+)".*/\1/' )
44-
45- if [ -z " $LATEST_TAG " ]; then
46- # Fallback to general releases list
47- LATEST_TAG=$( curl -s " https://api.github.com/repos/$REPO /releases" | grep ' "tag_name":' | head -n 1 | sed -E ' s/.*"([^"]+)".*/\1/' )
43+ # GitHub's /releases/latest endpoint only returns non-prereleases.
44+ # We fallback to the full list and grab the first one (usually latest or beta)
45+ # or look specifically for 'latest'.
46+ TAG_DATA=$( curl -fsSL -H " User-Agent: vibeauracle-installer" " https://api.github.com/repos/$REPO /releases" )
47+ LATEST_TAG=$( echo " $TAG_DATA " | grep ' "tag_name":' | head -n 1 | sed -E ' s/.*"([^"]+)".*/\1/' )
48+
49+ # If we found tags but it wasn't the 'latest' tag specifically,
50+ # try to see if 'latest' exists in the list for stability
51+ if [[ " $LATEST_TAG " != " latest" ]]; then
52+ STABLE_TAG=$( echo " $TAG_DATA " | grep ' "tag_name": "latest"' | head -n 1 | sed -E ' s/.*"([^"]+)".*/\1/' )
53+ if [ -n " $STABLE_TAG " ]; then
54+ LATEST_TAG=" $STABLE_TAG "
55+ fi
4856fi
4957
5058if [ -z " $LATEST_TAG " ]; then
You can’t perform that action at this time.
0 commit comments