MCPcopy Create free account
hub / github.com/arctic-cli/interface / upgrade

Function upgrade

packages/arctic/src/cli/upgrade.ts:4–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import { Installation } from "@/installation"
3
4export async function upgrade() {
5 const method = await Installation.method()
6 const latest = await Installation.latest(method).catch(() => {})
7 if (!latest) return
8 if (Installation.VERSION === latest) return
9 if (method === "unknown") return
10
11 await Installation.upgrade(method, latest)
12 .then(() => Bus.publish(Installation.Event.Updated, { version: latest }))
13 .catch(() => {})
14}

Callers 1

checkUpgradeFunction · 0.90

Calls 1

publishMethod · 0.45

Tested by

no test coverage detected