mirror of
https://gitlab.com/ric_harvey/MailHog.git
synced 2024-11-23 22:34:04 +00:00
Fix build
This commit is contained in:
parent
0862749fa9
commit
1397525c0d
2 changed files with 7 additions and 9 deletions
|
@ -6,6 +6,7 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/ian-kent/Go-MailHog/MailHog-UI/assets"
|
||||||
"github.com/ian-kent/Go-MailHog/config"
|
"github.com/ian-kent/Go-MailHog/config"
|
||||||
"github.com/ian-kent/Go-MailHog/data"
|
"github.com/ian-kent/Go-MailHog/data"
|
||||||
mhhttp "github.com/ian-kent/Go-MailHog/http"
|
mhhttp "github.com/ian-kent/Go-MailHog/http"
|
||||||
|
@ -42,7 +43,7 @@ func configure() {
|
||||||
MongoUri: mongouri,
|
MongoUri: mongouri,
|
||||||
MongoDb: mongodb,
|
MongoDb: mongodb,
|
||||||
MongoColl: mongocoll,
|
MongoColl: mongocoll,
|
||||||
Assets: Asset,
|
Assets: assets.Asset,
|
||||||
MessageChan: make(chan *data.Message),
|
MessageChan: make(chan *data.Message),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +84,7 @@ func main() {
|
||||||
func web_listen() {
|
func web_listen() {
|
||||||
log.Info("[HTTP] Binding to address: %s", conf.HTTPBindAddr)
|
log.Info("[HTTP] Binding to address: %s", conf.HTTPBindAddr)
|
||||||
|
|
||||||
var app = gotcha.Create(Asset)
|
var app = gotcha.Create(assets.Asset)
|
||||||
app.Config.Listen = conf.HTTPBindAddr
|
app.Config.Listen = conf.HTTPBindAddr
|
||||||
|
|
||||||
app.On(events.BeforeHandler, func(session *http.Session, next func()) {
|
app.On(events.BeforeHandler, func(session *http.Session, next func()) {
|
||||||
|
|
11
Makefile
11
Makefile
|
@ -1,13 +1,10 @@
|
||||||
DEPS = $(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
|
DEPS = $(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
|
||||||
|
|
||||||
all: deps bindata fmt
|
all: deps bindata fmt
|
||||||
go install
|
go install ./MailHog
|
||||||
|
|
||||||
bindata:
|
bindata:
|
||||||
go-bindata assets/...
|
go-bindata -o MailHog-UI/assets/assets.go -pkg assets MailHog-UI/assets/...
|
||||||
|
|
||||||
test: test-deps
|
|
||||||
go list ./... | xargs -n1 go test
|
|
||||||
|
|
||||||
release: release-deps
|
release: release-deps
|
||||||
gox -output="build/{{.Dir}}_{{.OS}}_{{.Arch}}"
|
gox -output="build/{{.Dir}}_{{.OS}}_{{.Arch}}"
|
||||||
|
@ -23,9 +20,9 @@ deps:
|
||||||
go get labix.org/v2/mgo
|
go get labix.org/v2/mgo
|
||||||
|
|
||||||
test-deps:
|
test-deps:
|
||||||
go get github.com/stretchr/testify
|
go get github.com/smartystreets/goconvey
|
||||||
|
|
||||||
release-deps:
|
release-deps:
|
||||||
go get github.com/mitchellh/gox
|
go get github.com/mitchellh/gox
|
||||||
|
|
||||||
.PNONY: all test deps bindata release fmt test-deps release-deps
|
.PNONY: all bindata release fmt test-deps release-deps
|
||||||
|
|
Loading…
Reference in a new issue