Skip to content

Commit

Permalink
Add moonraker updatemanager support
Browse files Browse the repository at this point in the history
  • Loading branch information
bofh69 committed Jan 26, 2025
1 parent 256ce68 commit 421cad3
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
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.

0 comments on commit 421cad3

Please sign in to comment.