Skip to content

Commit 32d008d

Browse files
authored
Merge pull request #36 from nathfavour/master
Fix install script for mobile
2 parents dd88198 + 643fd0b commit 32d008d

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

install.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,19 @@ fi
4040
echo "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
4856
fi
4957

5058
if [ -z "$LATEST_TAG" ]; then

0 commit comments

Comments
 (0)