tech(build): update build docs

This commit is contained in:
bergquist 2016-09-15 13:09:33 +02:00
parent d3a5d5c058
commit 6be48269e2
6 changed files with 12 additions and 28 deletions

View File

@ -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/...
```

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -1,9 +0,0 @@
{
"ImportPath": "github.com/grafana/grafana/pkg",
"GoVersion": "go1.6",
"GodepVersion": "v60",
"Packages": [
"./pkg/..."
],
"Deps": []
}

5
pkg/Godeps/Readme generated
View File

@ -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.