Repository navigation
Add SWU deploy as moonraker update_manager backend #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
meta-opencentauri/recipes-apps/moonraker/files/0001-Add-support-for-SWUDeploy.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| From 24908423635c63389f1da713cb723aa3a3af21c9 Mon Sep 17 00:00:00 2001 | ||
| From: James Turton <james.turton@gmx.com> | ||
| Date: Thu, 1 Oct 2026 22:04:33 +0200 | ||
| Subject: [PATCH] update_manager: Add support for SWUDeploy | ||
|
|
||
| --- | ||
| moonraker/components/update_manager/common.py | 3 +++ | ||
| moonraker/components/update_manager/update_manager.py | 4 +++- | ||
| 2 files changed, 6 insertions(+), 1 deletion(-) | ||
|
|
||
| diff --git a/moonraker/components/update_manager/common.py b/moonraker/components/update_manager/common.py | ||
| index 32c1cf8..232eb3d 100644 | ||
| --- a/moonraker/components/update_manager/common.py | ||
| +++ b/moonraker/components/update_manager/common.py | ||
| @@ -51,6 +51,7 @@ class AppType(ExtendedEnum): | ||
| ZIP = 4 | ||
| PYTHON = 5 | ||
| EXECUTABLE = 6 | ||
| + SWUPDATE = 7 | ||
|
|
||
| @classmethod | ||
| def detect(cls, app_path: Union[str, pathlib.Path, None] = None): | ||
| @@ -76,6 +77,8 @@ class AppType(ExtendedEnum): | ||
| return [] | ||
| elif self in [AppType.WEB, AppType.ZIP, AppType.EXECUTABLE]: | ||
| return [Channel.STABLE, Channel.BETA] # type: ignore | ||
| + elif self == AppType.SWUPDATE: | ||
| + return [Channel.STABLE, Channel.DEV] # type: ignore | ||
| else: | ||
| return list(Channel) | ||
|
|
||
| diff --git a/moonraker/components/update_manager/update_manager.py b/moonraker/components/update_manager/update_manager.py | ||
| index cd580c9..0973132 100644 | ||
| --- a/moonraker/components/update_manager/update_manager.py | ||
| +++ b/moonraker/components/update_manager/update_manager.py | ||
| @@ -17,6 +17,7 @@ from .app_deploy import AppDeploy | ||
| from .git_deploy import GitDeploy | ||
| from .net_deploy import NetDeploy | ||
| from .python_deploy import PythonDeploy | ||
| +from .swu_deploy import SwuDeploy | ||
| from .system_deploy import PackageDeploy | ||
| from ...common import RequestType | ||
| from ...utils.filelock import AsyncExclusiveFileLock, LockTimeout | ||
| @@ -61,7 +62,8 @@ def get_deploy_class( | ||
| AppType.GIT_REPO: GitDeploy, | ||
| AppType.ZIP: NetDeploy, | ||
| AppType.PYTHON: PythonDeploy, | ||
| - AppType.EXECUTABLE: NetDeploy | ||
| + AppType.EXECUTABLE: NetDeploy, | ||
| + AppType.SWUPDATE: SwuDeploy | ||
| } | ||
| return _deployers.get(key, default) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the commit the nightly release it based off, rather than just checking against latest commit hash on main