mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 18:44:54 +08:00
updated build script and readme with build instructions
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
[run]
|
[run]
|
||||||
init_cmds = [
|
init_cmds = [
|
||||||
["make", "build"],
|
["go", "build", "-o", "./bin/grafana"],
|
||||||
["./bin/grafana", "web"]
|
["./bin/grafana", "web"]
|
||||||
]
|
]
|
||||||
watch_all = true
|
watch_all = true
|
||||||
@ -12,6 +12,6 @@ watch_dirs = [
|
|||||||
watch_exts = [".go", ".ini"]
|
watch_exts = [".go", ".ini"]
|
||||||
build_delay = 1500
|
build_delay = 1500
|
||||||
cmds = [
|
cmds = [
|
||||||
["make", "build"],
|
["go", "build", "-o", "./bin/grafana"],
|
||||||
["./bin/grafana", "web"]
|
["./bin/grafana", "web"]
|
||||||
]
|
]
|
||||||
|
18
Makefile
18
Makefile
@ -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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
23
README.md
23
README.md
@ -1,3 +1,26 @@
|
|||||||
Work in progress Grafana 2.0 (with included Grafana backend)
|
Work in progress Grafana 2.0 (with included Grafana backend)
|
||||||
|
|
||||||
[](https://app.wercker.com/project/bykey/0f109051cfaf2a6d94c0eebdc0dcaeae)
|
[](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
|
||||||
|
```
|
||||||
|
1
build.go
1
build.go
@ -84,6 +84,7 @@ func main() {
|
|||||||
|
|
||||||
func setup() {
|
func setup() {
|
||||||
runPrint("go", "get", "-v", "github.com/tools/godep")
|
runPrint("go", "get", "-v", "github.com/tools/godep")
|
||||||
|
runPrint("go", "install", "-v", "github.com/mattn/go-sqlite3")
|
||||||
}
|
}
|
||||||
|
|
||||||
func test(pkg string) {
|
func test(pkg string) {
|
||||||
|
Reference in New Issue
Block a user