Skip to content

Commit 5301421

Browse files
fix: use remote URLs in pre-clone Docker guidance + harden tag selection
- Change check_docker() Linux guidance to use raw.githubusercontent.com URLs instead of local paths that don't exist before clone_or_update - Add re-run hint after bootstrap/Docker install - Harden get_latest_release_tag() to explicitly: - Match only ^v[0-9] product tags (v1.3.0, etc.) - Exclude desktop-v* and other prefixed tags - Both buildx missing and Docker missing messages now use remote URLs Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
1 parent 575562d commit 5301421

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

‎scripts/self-host/remote-install.sh‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,13 @@ check_docker() {
112112
echo
113113
if [[ "$OS_TYPE" == "linux" ]]; then
114114
echo "On a fresh Linux server, run the bootstrap script first:"
115-
echo " ${BOLD}sudo ./scripts/self-host/bootstrap-server.sh${NC}"
115+
echo " ${BOLD}curl -fsSL https://raw.githubusercontent.com/${DEEPSQL_REPO}/main/scripts/self-host/bootstrap-server.sh | sudo bash${NC}"
116116
echo
117117
echo "Or install Docker manually:"
118118
echo " curl -fsSL https://get.docker.com | sh"
119119
echo
120-
echo "After installing Docker, re-run this installer."
120+
echo "After installing Docker, re-run this installer:"
121+
echo " curl -fsSL https://raw.githubusercontent.com/${DEEPSQL_REPO}/main/scripts/self-host/remote-install.sh | bash"
121122
elif [[ "$OS_TYPE" == "darwin" ]]; then
122123
echo "Install Docker Desktop for Mac from:"
123124
echo " https://www.docker.com/products/docker-desktop"
@@ -165,7 +166,9 @@ check_docker() {
165166
echo " apt install docker-buildx-plugin # Debian/Ubuntu"
166167
echo
167168
echo "Or run the bootstrap script:"
168-
echo " sudo ./scripts/self-host/bootstrap-server.sh"
169+
echo " curl -fsSL https://raw.githubusercontent.com/${DEEPSQL_REPO}/main/scripts/self-host/bootstrap-server.sh | sudo bash"
170+
echo
171+
echo "Then re-run this installer."
169172
exit 1
170173
fi
171174
if ! version_ge "$buildx_version" "0.17.0"; then
@@ -180,17 +183,24 @@ check_docker() {
180183
# ── Release Tag Detection ─────────────────────────────────────────────────────
181184

182185
get_latest_release_tag() {
183-
# Query GitHub API for tags, filter to product tags (v*), exclude desktop-only tags
186+
# Query GitHub API for tags, filter to product tags (v[0-9]*), exclude desktop-v* tags
184187
local tags
185188
tags="$(curl -fsSL "https://api.github.com/repos/${DEEPSQL_REPO}/tags?per_page=50" 2>/dev/null || true)"
186189

187190
if [[ -z "$tags" ]]; then
188191
return 1
189192
fi
190193

191-
# Extract tag names that match v* but not desktop-v*
194+
# Extract tag names, filter to product releases only:
195+
# - Must start with v followed by a digit (v1.0.0, v2.3.4, etc.)
196+
# - Excludes desktop-v*, agent-v*, or any other prefixed tags
192197
local latest
193-
latest="$(echo "$tags" | grep -o '"name": *"v[^"]*"' | head -1 | cut -d'"' -f4 || true)"
198+
latest="$(echo "$tags" \
199+
| grep -o '"name": *"[^"]*"' \
200+
| cut -d'"' -f4 \
201+
| grep -E '^v[0-9]' \
202+
| grep -v '^desktop-' \
203+
| head -1 || true)"
194204

195205
if [[ -n "$latest" ]]; then
196206
echo "$latest"

0 commit comments

Comments
 (0)