mage: add the management target
This commit is contained in:
parent
be8befc81d
commit
a7d30e9c01
2 changed files with 17 additions and 0 deletions
14
magefiles/manage.go
Normal file
14
magefiles/manage.go
Normal 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
|
||||||
|
}
|
|
@ -14,6 +14,9 @@ import (
|
||||||
|
|
||||||
const templateExtension string = ".gotmpl"
|
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 {
|
func Templates() error {
|
||||||
homeConfigDirectory, err := os.UserConfigDir()
|
homeConfigDirectory, err := os.UserConfigDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue