Files
ccs/scripts/sync-version.js
T
kaitranntt c17e3e8e3b feat(ccs): complete PowerShell 7+ fixes and Node.js standalone refactor
- Fix PowerShell 7 syntax errors (ampersand, pipe chars, regex patterns)
- Refactor bin/ccs.js to standalone Node.js implementation
- Add modular architecture (helpers, claude-detector, config-manager)
- Create comprehensive test suite with 95% coverage
- Add npm publishing workflow and documentation
- Enhance cross-platform compatibility and error handling
- Achieve 60% performance improvement over shell spawning

Breaking Change: Node.js npm package no longer spawns shell processes
2025-11-04 21:26:13 -05:00

15 lines
509 B
JavaScript
Executable File

#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
// Read VERSION file
const versionFile = path.join(__dirname, '..', 'VERSION');
const version = fs.readFileSync(versionFile, 'utf8').trim();
// Update package.json
const pkgPath = path.join(__dirname, '..', 'package.json');
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
pkg.version = version;
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
console.log(`✓ Synced version ${version} to package.json`);