Add automated versioning and deployment system
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user