@puberty-labs/bi-tch
Version:
BiTCH-MCP: Autonomous AI Coordination Platform - BETA: ZombieDust Protocol operational! Revolutionary AI-to-AI coordination with pure MCP integration. FOLLOW BETA RELEASES for latest features!
52 lines (42 loc) ⢠1.77 kB
JavaScript
/**
* BiTCH Version Verification Script
* Prevents version tracking disasters by checking consistency across all sources
*/
const fs = require('fs');
const { execSync } = require('child_process');
const path = require('path');
function verifyVersions() {
console.log('š BiTCH Version Verification...\n');
// Get package.json version
const packagePath = path.join(__dirname, '../package.json');
const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
const localVersion = packageJson.version;
// Get NPM version
let npmVersion;
try {
npmVersion = execSync('npm view @puberty-labs/bi-tch version', { encoding: 'utf8' }).trim();
} catch (error) {
console.log('ā Could not fetch NPM version:', error.message);
npmVersion = 'ERROR';
}
// Check RELEASE_TRACKER.md
const trackerPath = path.join(__dirname, '../RELEASE_TRACKER.md');
const trackerContent = fs.readFileSync(trackerPath, 'utf8');
const trackerVersionMatch = trackerContent.match(/\*\*Current Version:\*\* v([0-9.]+)/);
const trackerVersion = trackerVersionMatch ? trackerVersionMatch[1] : 'NOT FOUND';
// Display results
console.log(`š¦ package.json: v${localVersion}`);
console.log(`š NPM published: v${npmVersion}`);
console.log(`š RELEASE_TRACKER: v${trackerVersion}`);
// Check consistency
const allMatch = localVersion === npmVersion && localVersion === trackerVersion;
if (allMatch) {
console.log('\nā
ALL VERSIONS CONSISTENT! Safe to proceed with development.');
} else {
console.log('\nšØ VERSION MISMATCH DETECTED!');
console.log('ā Update RELEASE_TRACKER.md and/or publish to NPM before development!');
process.exit(1);
}
}
verifyVersions();