MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / upgrade

Function upgrade

apps/cli/src/commands/cli/upgrade.ts:133–155  ·  view source on GitHub ↗
(options: UpgradeOptions = {})

Source from the content-addressed store, hash-verified

131}
132
133export async function upgrade(options: UpgradeOptions = {}): Promise<void> {
134 const currentVersion = options.currentVersion ?? VERSION
135 const fetchImpl = options.fetchImpl ?? fetch
136 const runInstaller = options.runInstaller
137
138 console.log(`Current version: ${currentVersion}`)
139
140 const latestVersion = await getLatestCliVersion(fetchImpl)
141 console.log(`Latest version: ${latestVersion}`)
142
143 if (compareVersions(latestVersion, currentVersion) <= 0) {
144 console.log("Roo CLI is already up to date.")
145 return
146 }
147
148 console.log(`Upgrading Roo CLI from ${currentVersion} to ${latestVersion}...`)
149 if (runInstaller) {
150 await runInstaller()
151 } else {
152 await runUpgradeInstaller(latestVersion)
153 }
154 console.log("✓ Upgrade completed.")
155}

Callers 2

index.tsFile · 0.85
upgrade.test.tsFile · 0.85

Calls 4

getLatestCliVersionFunction · 0.85
compareVersionsFunction · 0.85
runUpgradeInstallerFunction · 0.85
logMethod · 0.65

Tested by

no test coverage detected