From 4131b75562ecfed37407e7a9ee94e7d61436a3af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 5 Jan 2015 16:17:36 +0100 Subject: [PATCH] updated build script and readme with build instructions --- .bra.toml | 4 ++-- Makefile | 18 ------------------ README.md | 23 +++++++++++++++++++++++ build.go | 1 + 4 files changed, 26 insertions(+), 20 deletions(-) delete mode 100644 Makefile diff --git a/.bra.toml b/.bra.toml index c1d971db43f..dd374c3b666 100644 --- a/.bra.toml +++ b/.bra.toml @@ -1,6 +1,6 @@ [run] init_cmds = [ - ["make", "build"], + ["go", "build", "-o", "./bin/grafana"], ["./bin/grafana", "web"] ] watch_all = true @@ -12,6 +12,6 @@ watch_dirs = [ watch_exts = [".go", ".ini"] build_delay = 1500 cmds = [ - ["make", "build"], + ["go", "build", "-o", "./bin/grafana"], ["./bin/grafana", "web"] ] diff --git a/Makefile b/Makefile deleted file mode 100644 index 7b74528cea0..00000000000 --- a/Makefile +++ /dev/null @@ -1,18 +0,0 @@ - - -all: build - -build: - go build -o bin/grafana . - go test ./pkg/... - -lint: - @gofmt -w pkg && go tool vet pkg/**/*.go && echo "$(GOLINT)" - -setup: - go get github.com/tools/godep - go install github.com/mattn/go-sqlite3 - - - - diff --git a/README.md b/README.md index 6fdb471d847..79c912a3b57 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,26 @@ Work in progress Grafana 2.0 (with included Grafana backend) [![wercker status](https://app.wercker.com/status/0f109051cfaf2a6d94c0eebdc0dcaeae/s "wercker status")](https://app.wercker.com/project/bykey/0f109051cfaf2a6d94c0eebdc0dcaeae) + +## building and running + +``` +go run build.go setup (only needed once to install godep) +go run build.go build +``` + +For quicker builds: + +``` +godep restore (will pull down all golang lib dependecies in your current GOPATH) +go build -o ./bin/grafana . +``` + +To build less to css for frontend: + +``` +cd grafana +npm install +npm install -g grunt-cli +grunt +``` diff --git a/build.go b/build.go index 341f589cf10..0831a92844e 100644 --- a/build.go +++ b/build.go @@ -84,6 +84,7 @@ func main() { func setup() { runPrint("go", "get", "-v", "github.com/tools/godep") + runPrint("go", "install", "-v", "github.com/mattn/go-sqlite3") } func test(pkg string) {