Просмотр исходного кода

fix(readme): minor readme update

Torkel Ödegaard 10 лет назад
Родитель
Сommit
3668cb6dd4
2 измененных файлов с 6 добавлено и 7 удалено
  1. 3 4
      README.md
  2. 3 3
      build.go

+ 3 - 4
README.md

@@ -75,7 +75,7 @@ the latest master builds [here](http://grafana.org/download/builds)
 
 
 ### Dependencies
 ### Dependencies
 
 
-- Go 1.4
+- Go 1.5
 - NodeJS
 - NodeJS
 
 
 ### Get Code
 ### Get Code
@@ -90,8 +90,7 @@ Replace X.Y.Z by actual version number.
 cd $GOPATH/src/github.com/grafana/grafana
 cd $GOPATH/src/github.com/grafana/grafana
 go run build.go setup            (only needed once to install godep)
 go run build.go setup            (only needed once to install godep)
 godep restore                    (will pull down all golang lib dependencies in your current GOPATH)
 godep restore                    (will pull down all golang lib dependencies in your current GOPATH)
-go build -ldflags "-X main.build_date=`date +%Y-%m-%d` -X main.version=X.Y.Z -X main.commit=`git rev-parse --verify HEAD`" 
-
+godep go run build.go build
 ```
 ```
 
 
 ### Building frontend assets
 ### Building frontend assets
@@ -114,7 +113,7 @@ bra run
 
 
 ### Running
 ### Running
 ```
 ```
-./grafana
+./bin/grafana-server
 ```
 ```
 
 
 Open grafana in your browser (default http://localhost:3000) and login with admin user (default user/pass = admin/admin).
 Open grafana in your browser (default http://localhost:3000) and login with admin user (default user/pass = admin/admin).

+ 3 - 3
build.go

@@ -328,9 +328,9 @@ func build(pkg string, tags []string) {
 func ldflags() string {
 func ldflags() string {
 	var b bytes.Buffer
 	var b bytes.Buffer
 	b.WriteString("-w")
 	b.WriteString("-w")
-	b.WriteString(fmt.Sprintf(" -X main.version %s", version))
-	b.WriteString(fmt.Sprintf(" -X main.commit %s", getGitSha()))
-	b.WriteString(fmt.Sprintf(" -X main.buildstamp %d", buildStamp()))
+	b.WriteString(fmt.Sprintf(" -X main.version=%s", version))
+	b.WriteString(fmt.Sprintf(" -X main.commit=%s", getGitSha()))
+	b.WriteString(fmt.Sprintf(" -X main.buildstamp=%d", buildStamp()))
 	return b.String()
 	return b.String()
 }
 }