Improve version management system

- Fix version-check.js to use git tag version for releases
- Add new-version.js script for proper version/tag synchronization
- Update package.json to correct version 1.1.0

The new-version.js script ensures package.json and git tags are always synchronized by:
1. Updating package.json with new version
2. Committing the change
3. Tagging the commit

This prevents version mismatches and git dirty states.
This commit is contained in:
2026-01-21 21:06:35 +01:00
parent 710682d931
commit 86687cb6a3
3 changed files with 97 additions and 3 deletions

View File

@@ -16,7 +16,9 @@ try {
const gitTag = execSync('git tag --points-at HEAD', { encoding: 'utf8' }).trim();
if (gitTag) {
// We're at a tagged commit - use clean version
// We're at a tagged commit - extract version from tag
const tagVersion = gitTag.replace(/^v/, ''); // Remove 'v' prefix if present
version = tagVersion;
console.log(`✅ Building release version ${version} (tagged: ${gitTag})`);
isRelease = true;
} else {
@@ -43,4 +45,4 @@ export const BUILD_TIME = '${new Date().toISOString()}';
`;
fs.writeFileSync(versionFile, versionContent);
console.log(`📝 Generated ${versionFile} with version ${version}`);
console.log(`📝 Generated ${versionFile} with version ${version}`);