diff --git a/README.md b/README.md index b70f659..567b259 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ git clone https://github.com/JordanKnott/project-citadel && cd project-citadel Next we need to build the binary. This project uses [Mage](https://magefile.org/) for its build tool. ``` bash +go run cmd/mage/main.go install go run cmd/mage/main.go build ``` diff --git a/magefile.go b/magefile.go index fe483d2..8d43ac4 100644 --- a/magefile.go +++ b/magefile.go @@ -21,11 +21,11 @@ var Aliases = map[string]interface{}{ type Frontend mg.Namespace func (Frontend) Install() error { - return sh.Run("yarn", "install", "--cwd", "frontend") + return sh.RunV("yarn", "--cwd", "frontend", "install") } func (Frontend) Build() error { - return sh.Run("yarn", "build", "--cwd", "frontend") + return sh.RunV("yarn", "--cwd", "frontend", "build") } type Backend mg.Namespace @@ -44,6 +44,7 @@ func (Backend) GenFrontend() error { } func (Backend) Build() error { + fmt.Println("compiling binary dist/citadel") return sh.Run("go", "build", "-o", "dist/citadel", "cmd/citadel/main.go") } @@ -73,6 +74,9 @@ func (Backend) Schema() error { return sh.Run("gqlgen") } -func Build() { - mg.SerialDeps(Frontend.Install, Frontend.Build, Backend.GenFrontend, Backend.Build) +func Install() { + mg.SerialDeps(Frontend.Install) +} +func Build() { + mg.SerialDeps(Frontend.Build, Backend.GenFrontend, Backend.Build) }