'wdcli backup': Rework backup process

This commit reworks the backup process to dynamically find the list of
components.
This commit is contained in:
Tom Wiesing 2022-09-17 16:30:32 +02:00
parent 55bee7422d
commit 5cd5ae9be2
No known key found for this signature in database
32 changed files with 361 additions and 279 deletions

View file

@ -13,9 +13,9 @@ import (
// TODO: Move this package into components
// Installable represents a Stack that can be automatically installed from a set of resources
// StackWithResources represents a Stack that can be automatically installed from a set of resources.
// See the [Install] method.
type Installable struct {
type StackWithResources struct {
Stack
// Installable enabled installing several resources from a (potentially embedded) filesystem.
@ -42,7 +42,7 @@ type InstallationContext map[string]string
//
// Installation is non-interactive, but will provide debugging output onto io.
// InstallationContext
func (is Installable) Install(io stream.IOStream, context InstallationContext) error {
func (is StackWithResources) Install(io stream.IOStream, context InstallationContext) error {
if is.ContextPath != "" {
// setup the base files
if err := unpack.InstallDir(