Fix #11 - add build documentation

This commit is contained in:
Ian Kent 2014-12-21 07:55:53 +00:00
parent 9c2a484d6b
commit a8d1d0e42d
2 changed files with 25 additions and 0 deletions

23
BUILD.md Normal file
View file

@ -0,0 +1,23 @@
Bulding MailHog
===============
MailHog is built using `make`, and using [this Makefile](Makefile).
If you aren't making any code changes, you can install MailHog using
`go get github.com/ian-kent/Go-MailHog`, since [assets.go](MailHog-UI/assets/assets.go)
is already pre-compiled and committed to this repository.
### Why do I need a Makefile?
MailHog has HTML, CSS and Javascript assets which need to be converted
to a go source file using [go-bindata](https://github.com/jteeuwen/go-bindata).
This must happen before running `go build` or `go install` to avoid compilation
errors (e.g., `no buildable Go source files in MailHog-UI/assets`).
### go generate
The build should be updated to use `go generate` (added in Go 1.4) to
preprocess static assets into go source files.
However, this will break backwards compatibility with Go 1.2/1.3.

View file

@ -44,6 +44,8 @@ Go was chosen for portability - MailHog runs without installation on multiple pl
Clone this repository to ```$GOPATH/src/github.com/ian-kent/Go-MailHog``` and type ```make deps```. Clone this repository to ```$GOPATH/src/github.com/ian-kent/Go-MailHog``` and type ```make deps```.
See the [Building MailHog](BUILD.md) guide.
Requires Go 1.2+ to build. Requires Go 1.2+ to build.
Run tests using ```make test``` or ```goconvey```. Run tests using ```make test``` or ```goconvey```.