Please check it out, and let me know if there are any problems with modules 
support.  

https://github.com/magefile/mage
https://magefile.org


*About Mage*

I don't think I've posted here about Mage, so for those that haven't seen 
it, it's a Make replacement, sort of like Ruby's Rake, except you write Go 
instead of bash or ruby.

Exported functions in the magefile become mage targets.  Supports 
dependency/prerequisite chains, where each dependency is a function that is 
guaranteed to run exactly once, before all the things that depend on it.  
Mage has helper packages to make running shell commands painless and easy.


*Sample Magefile*


//+build mage

// This is the magefile for your system.
package main

import (
    "github.com/magefile/mage/mg"
    "github.com/magefile/mage/sh"
)

// Builds the application.
func Build() error {
    mg.Deps(Protos, Generate)
    println("building")
    return sh.Run("go", "build", "-o", "myapp", ".")
}

// Compiles the protos.
func Protos() error {
    mg.Deps(Generate)
    println("compiling protos")
    return nil
}

// Runs go generate.
func Generate() error {
    println("generating...")
    return sh.Run("go", "generate", "./...")
}

*Usage*

$ mage This is the magefile for your system. Targets: build Builds the 
application. generate Runs go generate. protos Compiles the protos.

$ mage build
generating...
compiling protos
building 


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to