mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-21 07:26:18 -05:00
Not checking for updates when WROL Mode is enabled.
This commit is contained in:
parent
269a1f6570
commit
fa9fb9ab08
3 changed files with 7 additions and 4 deletions
2
main.py
2
main.py
|
|
@ -393,6 +393,8 @@ async def perpetual_check_for_updates():
|
|||
|
||||
if result.get('update_available'):
|
||||
logger.info(f"Update available: {result['commits_behind']} commits behind on {result['branch']}")
|
||||
except WROLModeEnabled:
|
||||
logger.debug('Refusing to check for updates when WROL Mode is enabled.')
|
||||
except Exception as e:
|
||||
logger.error('Failed to check for updates', exc_info=e)
|
||||
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ def get_collection_metadata(kind: str) -> dict:
|
|||
{'key': 'actions', 'label': 'Manage', 'sortable': False, 'type': 'actions'}
|
||||
],
|
||||
'fields': [
|
||||
{'key': 'directory', 'label': 'Directory', 'type': 'text',
|
||||
{'key': 'directory', 'label': 'Directory', 'type': 'directory',
|
||||
'placeholder': 'Optional directory path'},
|
||||
{'key': 'tag_name', 'label': 'Tag', 'type': 'tag',
|
||||
'placeholder': 'Select or create tag', 'depends_on': 'directory'},
|
||||
|
|
@ -249,7 +249,7 @@ def get_collection_metadata(kind: str) -> dict:
|
|||
'fields': [
|
||||
{'key': 'name', 'label': 'Name', 'type': 'text', 'required': True},
|
||||
{'key': 'url', 'label': 'URL', 'type': 'text', 'placeholder': 'Channel URL'},
|
||||
{'key': 'directory', 'label': 'Directory', 'type': 'text', 'required': True},
|
||||
{'key': 'directory', 'label': 'Directory', 'type': 'directory', 'required': True},
|
||||
{'key': 'tag_name', 'label': 'Tag', 'type': 'tag',
|
||||
'placeholder': 'Select or create tag'},
|
||||
{'key': 'description', 'label': 'Description', 'type': 'textarea',
|
||||
|
|
@ -279,7 +279,7 @@ def get_collection_metadata(kind: str) -> dict:
|
|||
],
|
||||
'fields': [
|
||||
{'key': 'name', 'label': 'Name', 'type': 'text', 'required': True},
|
||||
{'key': 'directory', 'label': 'Directory', 'type': 'text'},
|
||||
{'key': 'directory', 'label': 'Directory', 'type': 'directory'},
|
||||
{'key': 'tag_name', 'label': 'Tag', 'type': 'tag'},
|
||||
{'key': 'description', 'label': 'Description', 'type': 'textarea'}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ with the remote origin branch, and to trigger the upgrade process.
|
|||
import pathlib
|
||||
import subprocess
|
||||
|
||||
from wrolpi.common import logger
|
||||
from wrolpi.common import logger, wrol_mode_check
|
||||
from wrolpi.vars import DOCKERIZED, PROJECT_DIR
|
||||
|
||||
logger = logger.getChild(__name__)
|
||||
|
|
@ -144,6 +144,7 @@ def get_commits_behind(branch: str) -> int:
|
|||
return 0
|
||||
|
||||
|
||||
@wrol_mode_check
|
||||
def check_for_update(fetch: bool = True) -> dict:
|
||||
"""
|
||||
Check if an update is available by comparing local HEAD with origin/{branch}.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue