This commit is contained in:
2026-09-11 13:51:39 +08:00
parent 54b2c16a76
commit 1d0fbea069
3 changed files with 26 additions and 29 deletions
+9 -9
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Public release repository:
# https://eightarms.net/fourbroad/octopus-release
# https://eightarms.net/Octopus/octopus-release
set -euo pipefail
APP=octopus
@@ -22,8 +22,8 @@ Options:
--no-modify-path Don't modify shell config files (.zshrc, .bashrc, etc.)
Examples:
curl -fsSL https://eightarms.net/fourbroad/octopus-release/raw/branch/main/install | bash
curl -fsSL https://eightarms.net/fourbroad/octopus-release/raw/branch/main/install | bash -s -- --version 1.0.180
curl -fsSL https://eightarms.net/install | bash
curl -fsSL https://eightarms.net/install | bash -s -- --version 1.0.180
./install --binary /path/to/octopus
EOF
}
@@ -183,24 +183,24 @@ else
fi
if [ -z "$requested_version" ]; then
specific_version=$(curl -s "${GITEA_API_URL:-https://eightarms.net/api/v1}/repos/fourbroad/octopus-release/releases?limit=1" | sed -n 's/.*"tag_name": *"v\([^"]*\)".*/\1/p')
specific_version=$(curl -s "${GITEA_API_URL:-https://eightarms.net/api/v1}/repos/Octopus/octopus-release/releases?limit=1" | sed -n 's/.*"tag_name": *"v\([^"]*\)".*/\1/p')
if [[ $? -ne 0 || -z "$specific_version" ]]; then
echo -e "${RED}Failed to fetch version information${NC}"
exit 1
fi
url="${OCTOPUS_DOWNLOAD_BASE:-https://eightarms.net}/fourbroad/octopus-release/releases/download/v${specific_version}/$filename"
url="${OCTOPUS_DOWNLOAD_BASE:-https://eightarms.net}/Octopus/octopus-release/releases/download/v${specific_version}/$filename"
else
# Strip leading 'v' if present
requested_version="${requested_version#v}"
url="${OCTOPUS_DOWNLOAD_BASE:-https://eightarms.net}/fourbroad/octopus-release/releases/download/v${requested_version}/$filename"
url="${OCTOPUS_DOWNLOAD_BASE:-https://eightarms.net}/Octopus/octopus-release/releases/download/v${requested_version}/$filename"
specific_version=$requested_version
# Verify the release exists before downloading
http_status=$(curl -sI -o /dev/null -w "%{http_code}" "${GITEA_URL:-https://eightarms.net}/fourbroad/octopus-release/releases/tag/v${requested_version}")
http_status=$(curl -sI -o /dev/null -w "%{http_code}" "${GITEA_URL:-https://eightarms.net}/Octopus/octopus-release/releases/tag/v${requested_version}")
if [ "$http_status" = "404" ]; then
echo -e "${RED}Error: Release v${requested_version} not found${NC}"
echo -e "${MUTED}Available releases: ${GITEA_URL:-https://eightarms.net}/fourbroad/octopus-release/releases${NC}"
echo -e "${MUTED}Available releases: ${GITEA_URL:-https://eightarms.net}/Octopus/octopus-release/releases${NC}"
exit 1
fi
fi
@@ -456,6 +456,6 @@ echo -e ""
echo -e "cd <project> ${MUTED}# Open directory${NC}"
echo -e "octopus ${MUTED}# Run command${NC}"
echo -e ""
echo -e "${MUTED}For more information visit ${NC}https://eightarms.net/fourbroad/octopus-release"
echo -e "${MUTED}For more information visit ${NC}https://eightarms.net/docs"
echo -e ""
echo -e ""