A Makefile example for simple golang projects.
You should change values of the following variables
BINARYchange fromsuperdoto the name of your projectGITHUB_USERNAMEchange fromturtlemonvhto your username
That should be it.
- you can put the project anywhere (doesn't have to be on your gopath) and it will work fine
- builds binaries for windows, linux, osx
- injects
COMMITandBRANCHas build variables- You need to define variables named
COMMITandBRANCHinmain.goto have those variables injected into your build
- You need to define variables named
- creates a test report in xunit format that can be consumed by build tools like jenkins
- creates a
vet.reportfile that is the output ofgo vet
- This Makefile works for a project that uses godeps.