Update-only helpers. The release build hands updating to the install * script, so none of this ships: no release URL construction, no archive * download, no extract-and-exec. Retained for the C suite, which still * covers the flow through the activation test seam. */ Build the download URL for the update command. */
| 11356 | * covers the flow through the activation test seam. */ |
| 11357 | /* Build the download URL for the update command. */ |
| 11358 | static void build_update_url(char *url, int url_sz, const char *os, const char *arch, |
| 11359 | const char *ext) { |
| 11360 | char base_url_buf[CLI_BUF_512]; |
| 11361 | const char *base_url = |
| 11362 | cbm_safe_getenv("CBM_DOWNLOAD_URL", base_url_buf, sizeof(base_url_buf), NULL); |
| 11363 | if (!base_url || !base_url[0]) { |
| 11364 | base_url = "https://github.com/DeusData/codebase-memory-mcp/releases/latest/download"; |
| 11365 | } |
| 11366 | /* Linux ships a fully-static "-portable" build; the standard linux binary |
| 11367 | * dynamically links glibc 2.38+ and fails on older distros. macOS/Windows |
| 11368 | * have no such variant. Keep in sync with install.sh / install.js / pypi |
| 11369 | * _cli.py. */ |
| 11370 | const char *portable = (strcmp(os, "linux") == 0) ? "-portable" : ""; |
| 11371 | snprintf(url, url_sz, "%s/codebase-memory-mcp-%s-%s%s.%s", base_url, os, arch, portable, ext); |
| 11372 | } |
| 11373 | |
| 11374 | /* Confirm index deletion before network I/O, but defer the deletion itself to |
| 11375 | * the final guarded activation after the verified binary is ready. Returns 0 |
no test coverage detected