Compare commits

...

7 Commits

Author SHA1 Message Date
Atif Ali 368a6fcc24 Merge branch 'main' into fix/windows-cli-install-page 2025-11-03 13:59:25 +05:00
Atif Ali 89d3874904 Discard changes to site/src/pages/CliInstallPage/CliInstallPageView.tsx 2025-11-03 13:59:07 +05:00
blink-so[bot] 59921fa5fa fix: preserve custom upgrade messages on Windows 2025-10-31 13:46:14 +00:00
blink-so[bot] 976bcf22d5 fix: apply biome formatting to strong tag 2025-10-31 13:37:22 +00:00
M Atif Ali ef5002d534 fix(cli,ui): fully hide install instructions on Windows (no docs link, no CLI upgrade message) 2025-10-31 18:33:18 +05:00
M Atif Ali 251a3e9de1 fix(cli,ui): hide curl install message on Windows; hide UI command on Windows (Chrome/Firefox compatible) 2025-10-31 18:29:42 +05:00
blink-so[bot] de5fd7b110 fix: don't show install.sh command on Windows
Detect Windows users via navigator.platform and show appropriate
installation instructions (GitHub releases + winget) instead of the
Linux/macOS install.sh script.
2025-10-30 16:25:43 +00:00
+3 -3
View File
@@ -1366,7 +1366,7 @@ func defaultUpgradeMessage(version string) string {
// to the GitHub release page to download the latest installer.
version = strings.TrimPrefix(version, "v")
if runtime.GOOS == "windows" {
return fmt.Sprintf("download the server version from: https://github.com/coder/coder/releases/v%s", version)
return ""
}
return fmt.Sprintf("download the server version with: 'curl -L https://coder.com/install.sh | sh -s -- --version %s'", version)
}
@@ -1412,8 +1412,8 @@ func wrapTransportWithVersionMismatchCheck(rt http.RoundTripper, inv *serpent.In
switch {
case serverInfo.UpgradeMessage != "":
upgradeMessage = serverInfo.UpgradeMessage
// The site-local `install.sh` was introduced in v2.19.0
case serverInfo.DashboardURL != "" && semver.Compare(semver.MajorMinor(serverVersion), "v2.19") >= 0:
// The site-local `install.sh` was introduced in v2.19.0. Skip curl instruction on Windows.
case runtime.GOOS != "windows" && serverInfo.DashboardURL != "" && semver.Compare(semver.MajorMinor(serverVersion), "v2.19") >= 0:
upgradeMessage = fmt.Sprintf("download %s with: 'curl -fsSL %s/install.sh | sh'", serverVersion, serverInfo.DashboardURL)
}
}