From 6be48269e2543715a6b6a6b15c87d8e95d569077 Mon Sep 17 00:00:00 2001 From: bergquist Date: Thu, 15 Sep 2016 13:09:33 +0200 Subject: [PATCH] tech(build): update build docs --- .github/CONTRIBUTING.md | 6 +++--- .hooks/pre-commit | 2 +- README.md | 8 +++----- docs/sources/project/building_from_source.md | 10 +++++----- pkg/Godeps/Godeps.json | 9 --------- pkg/Godeps/Readme | 5 ----- 6 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 pkg/Godeps/Godeps.json delete mode 100644 pkg/Godeps/Readme diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e79741bbe6c..148722e5f73 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -12,11 +12,11 @@ grunt karma:dev ### Run tests for backend assets before commit ``` -test -z "$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" +test -z "$(gofmt -s -l . | grep -v vendor/src/ | tee /dev/stderr)" ``` ### Run tests for frontend assets before commit ``` -grunt test -godep go test -v ./pkg/... +npm test +go test -v ./pkg/... ``` diff --git a/.hooks/pre-commit b/.hooks/pre-commit index 2519d4c44f4..0d7c6c9ee5f 100755 --- a/.hooks/pre-commit +++ b/.hooks/pre-commit @@ -1,6 +1,6 @@ #!/usr/bin/env bash -test -z "$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" +test -z "$(gofmt -s -l . | grep -v vendor/src/ | tee /dev/stderr)" if [ $? -gt 0 ]; then echo "Some files aren't formatted, please run 'go fmt ./pkg/...' to format your source code before committing" exit 1 diff --git a/README.md b/README.md index f8d1db6cd07..b786fbe1a27 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,8 @@ the latest master builds [here](http://grafana.org/download/builds) ### Dependencies -- Go 1.6 +- Go 1.6.2 - NodeJS v4+ -- [Godep](https://github.com/tools/godep) ### Get Code @@ -103,8 +102,7 @@ ln -s github.com/*your_account*/grafana $GOPATH/src/github.com/grafana/grafana ### Building the backend ```bash cd $GOPATH/src/github.com/grafana/grafana -go run build.go setup (only needed once to install godep) -godep restore (will pull down all golang lib dependencies in your current GOPATH) +go run build.go setup go run build.go build ``` @@ -126,7 +124,7 @@ grunt watch ``` ### Recompile backend on source change -To rebuild on source change (requires that you executed godep restore) +To rebuild on source change. ```bash go get github.com/Unknwon/bra bra run diff --git a/docs/sources/project/building_from_source.md b/docs/sources/project/building_from_source.md index 68d4611fc96..a9ce40b9ffa 100644 --- a/docs/sources/project/building_from_source.md +++ b/docs/sources/project/building_from_source.md @@ -24,9 +24,8 @@ go get github.com/grafana/grafana ## Building the backend ``` cd $GOPATH/src/github.com/grafana/grafana -go run build.go setup # (only needed once to install godep) -$GOPATH/bin/godep restore # (will pull down all golang lib dependencies in your current GOPATH) -go run build.go build # (or 'go build .') +go run build.go setup +go run build.go build # (or 'go build ./pkg/cmd/grafana-server') ``` #### Building on Windows @@ -45,7 +44,7 @@ grunt ``` ## Recompile backend on source change -To rebuild on source change (requires that you executed godep restore) +To rebuild on source change ``` go get github.com/Unknwon/bra bra run @@ -63,9 +62,10 @@ If you built it with `go build .`, run `./grafana` Open grafana in your browser (default [http://localhost:3000](http://localhost:3000)) and login with admin user (default user/pass = admin/admin). ## Developing for Grafana -To add features, customize your config, etc, you'll need to rebuild on source change (requires that you executed [godep restore](#build-the-backend), as outlined above). +To add features, customize your config, etc, you'll need to rebuild on source change. ``` go get github.com/Unknwon/bra + bra run ``` You'll also need to run `grunt watch` to watch for changes to the front-end. diff --git a/pkg/Godeps/Godeps.json b/pkg/Godeps/Godeps.json deleted file mode 100644 index 5cff21cdba5..00000000000 --- a/pkg/Godeps/Godeps.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "ImportPath": "github.com/grafana/grafana/pkg", - "GoVersion": "go1.6", - "GodepVersion": "v60", - "Packages": [ - "./pkg/..." - ], - "Deps": [] -} diff --git a/pkg/Godeps/Readme b/pkg/Godeps/Readme deleted file mode 100644 index 4cdaa53d56d..00000000000 --- a/pkg/Godeps/Readme +++ /dev/null @@ -1,5 +0,0 @@ -This directory tree is generated automatically by godep. - -Please do not edit. - -See https://github.com/tools/godep for more information.