mirror of
https://github.com/Dvorinka/Trackeep.git
synced 2026-06-03 20:12:58 +00:00
chore: update to v1.2.5 and simplify version management
🎯 Simplified Version System: - Update frontend/backend to v1.2.5 in package.json and go.mod - Frontend reads version from package.json directly - Backend reads version from go.mod directly - No environment variables needed for versioning 🔄 Automated Release Workflow: - GitHub Actions automatically updates all version files - Extracts version from Git tag (v1.2.5) - Updates package.json, go.mod, docker-compose files - Builds and pushes Docker images with proper tags - Creates GitHub release automatically 🚀 User Experience: - Just: docker compose up - System auto-detects version from code - Updates work with no manual setup - Proper semantic versioning (MAJOR.MINOR.PATCH) Ready for automated release!
This commit is contained in:
@@ -147,10 +147,24 @@ export const updateService = {
|
||||
}
|
||||
},
|
||||
|
||||
// Get current app version from build-time constant
|
||||
// Get current app version from package.json
|
||||
getCurrentVersion(): string {
|
||||
// Use build-time version from vite config, fallback to environment variable or default
|
||||
return (typeof __APP_VERSION__ !== 'undefined') ? __APP_VERSION__ : import.meta.env.VITE_APP_VERSION || '1.0.0';
|
||||
// Try to get version from package.json first, then fallback
|
||||
try {
|
||||
const response = await fetch('/package.json');
|
||||
if (response.ok) {
|
||||
const packageJson = await response.json();
|
||||
if (packageJson.version) {
|
||||
console.log('Version from package.json:', packageJson.version);
|
||||
return packageJson.version;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('Could not read package.json:', error);
|
||||
}
|
||||
|
||||
// Fallback to environment variable or default
|
||||
return import.meta.env.VITE_APP_VERSION || '1.2.5';
|
||||
},
|
||||
|
||||
// Poll for update progress during installation
|
||||
|
||||
Reference in New Issue
Block a user