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

Function getCurrentVersion

cli/release/index.js:215–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 2

ensureBinaryExistsFunction · 0.70
checkForUpdatesFunction · 0.70

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected