chainwatch: make target

This commit is contained in:
Łukasz Magiera 2019-11-16 20:51:54 +01:00
parent d235e7f20e
commit 80095fdf3c
3 changed files with 10 additions and 3 deletions

View File

@ -109,6 +109,12 @@ fountain:
go run github.com/GeertJohan/go.rice/rice append --exec fountain -i ./cmd/lotus-fountain
.PHONY: fountain
chainwatch:
rm -f chainwatch
go build -o chainwatch ./cmd/lotus-chainwatch
go run github.com/GeertJohan/go.rice/rice append --exec chainwatch -i ./cmd/lotus-chainwatch
.PHONY: chainwatch
stats:
rm -f stats
go build -o stats ./tools/stats

View File

@ -5,6 +5,7 @@ import (
"github.com/filecoin-project/lotus/build"
lcli "github.com/filecoin-project/lotus/cli"
logging "github.com/ipfs/go-log"
"golang.org/x/xerrors"
"gopkg.in/urfave/cli.v2"
"net/http"
"os"
@ -37,7 +38,7 @@ func main() {
}
if err := app.Run(os.Args); err != nil {
log.Warn(err)
log.Warnf("%+v", err)
return
}
}
@ -76,7 +77,7 @@ var runCmd = &cli.Command{
h, err := newHandler(api, st)
if err != nil {
return err
return xerrors.Errorf("handler setup: %w", err)
}
http.Handle("/", h)

View File

@ -47,7 +47,7 @@ func newHandler(api api.FullNode, st *storage) (*handler, error) {
base.Funcs(funcs)
return h, h.site.Walk(".", func(path string, info os.FileInfo, err error) error {
return h, h.site.Walk("", func(path string, info os.FileInfo, err error) error {
if filepath.Ext(path) != ".html" {
return nil
}