refactor(release): bump to 1.6.0 and unify version source

This commit is contained in:
2026-02-15 15:17:30 +03:00
parent e590a6cde0
commit b7fad78a71
4 changed files with 5 additions and 3 deletions

1
app_version.py Normal file
View File

@@ -0,0 +1 @@
APP_VERSION = "1.6.0"

View File

@@ -2,10 +2,11 @@ import os
import shutil
import subprocess
import sys
from app_version import APP_VERSION
# --- Конфигурация ---
APP_NAME = "AnabasisManager"
VERSION = "1.5.1" # Ваша версия
VERSION = APP_VERSION # Единая версия приложения
MAIN_SCRIPT = "main.py"
ICON_PATH = "icon.ico"
DIST_DIR = os.path.join("dist", APP_NAME)

View File

@@ -11,6 +11,7 @@ import re
import threading
import urllib.error
import urllib.request
from app_version import APP_VERSION
from PySide6.QtWidgets import (QApplication, QMainWindow, QLabel, QLineEdit,
QPushButton, QVBoxLayout, QWidget, QMessageBox,
QTextBrowser, QScrollArea, QCheckBox, QHBoxLayout,
@@ -33,7 +34,6 @@ LOG_FILE = os.path.join(APP_DATA_DIR, "app.log")
LOG_MAX_BYTES = 1024 * 1024 # 1 MB
LOG_BACKUP_FILE = os.path.join(APP_DATA_DIR, "app.log.1")
AUTH_RELOGIN_BACKOFF_SECONDS = 5.0
APP_VERSION = "1.5.1"
# Legacy owner/repo format for GitHub-only fallback.
UPDATE_REPOSITORY = ""
# Full repository URL is preferred (supports GitHub/Gitea).

View File

@@ -38,7 +38,7 @@ class AuthReloginSmokeTests(unittest.TestCase):
self.assertNotIn("self.retail_coffee_checkboxes", self.source)
def test_update_check_actions_exist(self):
self.assertIn("APP_VERSION = ", self.source)
self.assertIn("from app_version import APP_VERSION", self.source)
self.assertIn("UPDATE_REPOSITORY = ", self.source)
self.assertIn('QAction("Проверить обновления", self)', self.source)
self.assertIn("def check_for_updates(self, silent_no_updates=False):", self.source)