From a8d1d0e42d3f5c5eacc8f0f5bf2c7c32e1884675 Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Sun, 21 Dec 2014 07:55:53 +0000 Subject: [PATCH] Fix #11 - add build documentation --- BUILD.md | 23 +++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 BUILD.md diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 0000000..bdedcaa --- /dev/null +++ b/BUILD.md @@ -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. diff --git a/README.md b/README.md index c3c8273..53c9579 100644 --- a/README.md +++ b/README.md @@ -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```. +See the [Building MailHog](BUILD.md) guide. + Requires Go 1.2+ to build. Run tests using ```make test``` or ```goconvey```.