Add automated versioning and deployment system

This commit is contained in:
Your Name
2025-09-21 11:22:26 -04:00
parent a7dceb1156
commit ea387c0c9f
8 changed files with 446 additions and 42 deletions

View File

@@ -131,6 +131,25 @@ if (typeof window !== 'undefined') {
let modalContent = fs.readFileSync(modalPath, 'utf8');
// Read version from VERSION file and inject into modal title
const versionPath = path.join(__dirname, 'VERSION');
let versionTitle = 'Nostr Login';
if (fs.existsSync(versionPath)) {
try {
const version = fs.readFileSync(versionPath, 'utf8').trim();
versionTitle = `Nostr Login v${version}`;
console.log(`🔢 Using version: ${version}`);
} catch (error) {
console.warn('⚠️ Could not read VERSION file, using default title');
}
} else {
console.log('📋 No VERSION file found, using default title');
}
// Replace the modal title in the content
modalContent = modalContent.replace(/modalTitle\.textContent = 'Nostr Login';/, `modalTitle.textContent = '${versionTitle}';`);
// Skip header comments
let lines = modalContent.split('\n');
let contentStartIndex = 0;