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:
Tomas Dvorak
2026-02-27 19:08:24 +01:00
parent a9395be39f
commit 3b8e14c6b8
8 changed files with 296 additions and 20 deletions
+19 -4
View File
@@ -71,10 +71,25 @@ func CheckForUpdates(c *gin.Context) {
updateMutex.Lock()
defer updateMutex.Unlock()
// Get current version from environment or default
currentVersion := os.Getenv("APP_VERSION")
if currentVersion == "" {
currentVersion = "1.0.0"
// Get current version from go.mod
currentVersion := "1.2.5"
// Try to read from go.mod if running in development
if _, err := os.Stat("go.mod"); err == nil {
if content, err := os.ReadFile("go.mod"); err == nil {
lines := strings.Split(string(content), "\n")
for _, line := range lines {
if strings.Contains(line, "go ") && strings.Contains(line, "1.2.5") {
// Extract version from go.mod
parts := strings.Fields(line)
if len(parts) >= 2 {
currentVersion = strings.TrimSpace(parts[1])
log.Printf("Found version in go.mod: %s", currentVersion)
break
}
}
}
}
}
log.Printf("Checking for updates using Docker registry (current version: %s)", currentVersion)