MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / build_update_url

Function build_update_url

src/cli/cli.c:4201–4216  ·  view source on GitHub ↗

Build the download URL for the update command. */

Source from the content-addressed store, hash-verified

4199
4200/* Build the download URL for the update command. */
4201static void build_update_url(char *url, int url_sz, const char *os, const char *arch,
4202 const char *ext, bool want_ui) {
4203 char base_url_buf[CLI_BUF_512];
4204 const char *base_url =
4205 cbm_safe_getenv("CBM_DOWNLOAD_URL", base_url_buf, sizeof(base_url_buf), NULL);
4206 if (!base_url || !base_url[0]) {
4207 base_url = "https://github.com/DeusData/codebase-memory-mcp/releases/latest/download";
4208 }
4209 /* Linux ships a fully-static "-portable" build; the standard linux binary
4210 * dynamically links glibc 2.38+ and fails on older distros. macOS/Windows
4211 * have no such variant. Keep in sync with install.sh / install.js / pypi
4212 * _cli.py. */
4213 const char *portable = (strcmp(os, "linux") == 0) ? "-portable" : "";
4214 snprintf(url, url_sz, "%s/codebase-memory-mcp-%s%s-%s%s.%s", base_url, want_ui ? "ui-" : "", os,
4215 arch, portable, ext);
4216}
4217
4218/* Prompt to delete existing indexes. Returns 0 to continue, 1 to abort. */
4219static int update_clear_indexes(const char *home, bool dry_run) {

Callers 1

cbm_cmd_updateFunction · 0.85

Calls 1

cbm_safe_getenvFunction · 0.85

Tested by

no test coverage detected