feat(cli): add aliases to commands
This commit is contained in:
parent
53a50f2be4
commit
70dbc9e062
6 changed files with 20 additions and 27 deletions
14
magefile.go
14
magefile.go
|
|
@ -16,9 +16,8 @@ import (
|
|||
|
||||
// A build step that requires additional params, or platform specific steps for example
|
||||
func Build() error {
|
||||
mg.Deps(InstallDeps)
|
||||
fmt.Println("Building...")
|
||||
cmd := exec.Command("go", "build", "-o", "system_setup_tool", ".")
|
||||
cmd := exec.Command("go", "build", "-o", "sst", ".")
|
||||
return cmd.Run()
|
||||
}
|
||||
|
||||
|
|
@ -26,20 +25,13 @@ func Build() error {
|
|||
func Install() error {
|
||||
mg.Deps(Build)
|
||||
fmt.Println("Installing...")
|
||||
return os.Rename("./system_setup_tool", "/usr/bin/system_setup_tool")
|
||||
}
|
||||
|
||||
// Manage your deps, or running package managers.
|
||||
func InstallDeps() error {
|
||||
fmt.Println("Installing Deps...")
|
||||
cmd := exec.Command("go", "get", "github.com/stretchr/piglatin")
|
||||
return cmd.Run()
|
||||
return os.Rename("./sst", "~/.local/bin/sst")
|
||||
}
|
||||
|
||||
// Clean up after yourself
|
||||
func Clean() {
|
||||
fmt.Println("Cleaning...")
|
||||
os.RemoveAll("MyApp")
|
||||
os.RemoveAll("system_setup_tool")
|
||||
}
|
||||
|
||||
// Use gofmt to format your code
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue