mage: add the management target

This commit is contained in:
Dan Anglin 2024-09-10 16:12:16 +01:00
parent be8befc81d
commit a7d30e9c01
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638
2 changed files with 17 additions and 0 deletions

14
magefiles/manage.go Normal file
View file

@ -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
}

View file

@ -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 {