MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getCurrentVersion

Function getCurrentVersion

cli/release-staging/index.js:216–230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

214}
215
216function getCurrentVersion() {
217 try {
218 if (!fs.existsSync(CONFIG.metadataPath)) {
219 return null
220 }
221 const metadata = JSON.parse(fs.readFileSync(CONFIG.metadataPath, 'utf8'))
222 // Also verify the binary still exists
223 if (!fs.existsSync(CONFIG.binaryPath)) {
224 return null
225 }
226 return metadata.version || null
227 } catch (error) {
228 return null
229 }
230}
231
232function compareVersions(v1, v2) {
233 if (!v1 || !v2) return 0

Callers 2

ensureBinaryExistsFunction · 0.70
checkForUpdatesFunction · 0.70

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected