mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
refactor: extract code from the container package
This commit is contained in:
parent
4130b110c6
commit
d1abce889a
15 changed files with 253 additions and 185 deletions
|
@ -1,6 +1,7 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/containrrr/watchtower/pkg/filters"
|
||||
"os"
|
||||
"os/signal"
|
||||
"strconv"
|
||||
|
@ -108,7 +109,7 @@ func PreRun(cmd *cobra.Command, args []string) {
|
|||
|
||||
// Run is the main execution flow of the command
|
||||
func Run(c *cobra.Command, names []string) {
|
||||
filter := container.BuildFilter(names, enableLabel)
|
||||
filter := filters.BuildFilter(names, enableLabel)
|
||||
runOnce, _ := c.PersistentFlags().GetBool("run-once")
|
||||
|
||||
if runOnce {
|
||||
|
@ -172,7 +173,7 @@ func runUpgradesOnSchedule(filter t.Filter) error {
|
|||
|
||||
func runUpdatesWithNotifications(filter t.Filter) {
|
||||
notifier.StartNotification()
|
||||
updateParams := actions.UpdateParams{
|
||||
updateParams := t.UpdateParams{
|
||||
Filter: filter,
|
||||
Cleanup: cleanup,
|
||||
NoRestart: noRestart,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue