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

Function getCurrentVersion

freebuff/cli/release/index.js:215–228  ·  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 if (!fs.existsSync(CONFIG.binaryPath)) {
222 return null
223 }
224 return metadata.version || null
225 } catch (error) {
226 return null
227 }
228}
229
230function compareVersions(v1, v2) {
231 if (!v1 || !v2) return 0

Callers 2

ensureBinaryExistsFunction · 0.70
checkForUpdatesFunction · 0.70

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected