Skip to content
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

Add moonraker updatemanager support #23

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ To see its status, run:
sudo systemctl status nfc2klipper
```

## Automatic upgrades with moonraker

Moonraker can be configured to help upgrade nfc2klipper.

Copy the the `moonraker-nfc2klipper.cfg` file to the same dir as where
`moonraker.conf` is. Include the config file by adding:
```toml
[include moonraker-nfc2klipper.cfg]
```

## Developer info

Pull requests are happily accepted, but before making one make sure
Expand Down
2 changes: 1 addition & 1 deletion REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SPDX-PackageSupplier = "Sebastian Andersson <sebastian@bittr.nu>"
SPDX-PackageDownloadLocation = "https://github.com/bofh69/nfc2klipper"

[[annotations]]
path = [".github/**", "requirements.txt", ".gitignore", "nfc2klipper.service", "nfc2klipper.cfg"]
path = [".github/**", "requirements.txt", ".gitignore", "nfc2klipper.service", "nfc2klipper.cfg", "moonraker-nfc2klipper.cfg"]
precedence = "aggregate"
SPDX-FileCopyrightText = "$YEAR $NAME <$CONTACT>"
SPDX-License-Identifier = "CC0-1.0"
2 changes: 1 addition & 1 deletion klipper-spoolman.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ gcode:
spool_id=None
)}

#####################################################################

# This is the configuration for filament handling:
#
Expand Down Expand Up @@ -48,4 +49,3 @@ gcode:
{% else %}
{action_respond_info("Parameter 'ID' is required")}
{% endif %}

27 changes: 27 additions & 0 deletions moonraker-nfc2klipper.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Update manager configuration, based on klipper's config:
#
[update_manager nfc2klipper]
type: git_repo

# The update channel. May be set to stable, beta, or dev:
channel: dev

# The absolute path to the client's files on disk (~ is allowed).
path: ~/nfc2klipper

origin: https://github.com/bofh69/nfc2klipper.git
primary_branch: main
virtualenv: ~/nfc2klipper/venv
requirements: requirements.txt
#system_dependencies:
managed_services: nfc2klipper
info_tags:
desc=nfc2klipper
#pinned_commit:
# A git commit hash to "pin" updates to. When specified Moonraker will not
# update the repo beyond the pinned commit. If the repo is already beyond
# the specified commit, or if the commit is not in the repo, futher updates
# are disabled until the pinned_commit is changed. It is recommended to
# specify the complete hash, however abbreviated hashes with a minimum of
# 8 characters are accepted. The "pinned_commit" overrides the update
# behavior set by the "channel" option. The default is no pinned commit.
Loading