mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 15:34:15 +02:00
fix -> bauh release notification not working properly
This commit is contained in:
@@ -25,6 +25,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
- Core
|
||||||
|
- bauh release notification not working properly
|
||||||
- Web:
|
- Web:
|
||||||
- installation options window size
|
- installation options window size
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import logging
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from pkg_resources import parse_version
|
||||||
|
|
||||||
from bauh import __app_name__, __version__
|
from bauh import __app_name__, __version__
|
||||||
from bauh.api.constants import CACHE_PATH
|
from bauh.api.constants import CACHE_PATH
|
||||||
from bauh.api.http import HttpClient
|
from bauh.api.http import HttpClient
|
||||||
@@ -35,7 +37,7 @@ def check_for_update(logger: logging.Logger, http_client: HttpClient, i18n: I18n
|
|||||||
release_file = '{}/{}{}'.format(notifications_dir, '' if not tray else 'tray_', latest['tag_name'])
|
release_file = '{}/{}{}'.format(notifications_dir, '' if not tray else 'tray_', latest['tag_name'])
|
||||||
if os.path.exists(release_file):
|
if os.path.exists(release_file):
|
||||||
logger.info("Release {} already notified".format(latest['tag_name']))
|
logger.info("Release {} already notified".format(latest['tag_name']))
|
||||||
elif latest['tag_name'] > __version__:
|
elif parse_version(latest['tag_name']) > parse_version(__version__):
|
||||||
try:
|
try:
|
||||||
Path(notifications_dir).mkdir(parents=True, exist_ok=True)
|
Path(notifications_dir).mkdir(parents=True, exist_ok=True)
|
||||||
with open(release_file, 'w+') as f:
|
with open(release_file, 'w+') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user