From a7d30e9c01d23ba358b3628fa80831e92b1cf8c9 Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Tue, 10 Sep 2024 16:12:16 +0100 Subject: [PATCH] mage: add the management target --- magefiles/manage.go | 14 ++++++++++++++ magefiles/templates.go | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 magefiles/manage.go diff --git a/magefiles/manage.go b/magefiles/manage.go new file mode 100644 index 0000000..27ee376 --- /dev/null +++ b/magefiles/manage.go @@ -0,0 +1,14 @@ +//go:build mage + +package main + +import "github.com/magefile/mage/mg" + +var Default = Manage + +// Manage runs all the management tasks. +func Manage() error { + mg.Deps(Directories, Files, Templates) + + return nil +} diff --git a/magefiles/templates.go b/magefiles/templates.go index bac0541..e243c6f 100644 --- a/magefiles/templates.go +++ b/magefiles/templates.go @@ -14,6 +14,9 @@ import ( const templateExtension string = ".gotmpl" +// Templates generates the configuration files in the managed directory from the templates and +// ensures that they the generated files are symlinked correctly to the files in the user's home +// configuration directory. func Templates() error { homeConfigDirectory, err := os.UserConfigDir() if err != nil {