Build: make bra a local dependency (#17414)

Same idea as with the `gosec`, `revive` and etc.
Allows you to execute `make bra` as pinned local dependency instead
as global one. And therefore alleviates dependency installation issues.

README also updated - I was thinking to provide verbose installation instructions
for it. Since with that way we assume make is installed on the
developer system.

But it might be premature right now?
This commit is contained in:
Oleg Gaidarenko
2019-06-07 16:42:08 +03:00
committed by GitHub
parent 2316414786
commit bc7c420ee8
5 changed files with 82 additions and 32 deletions

View File

@@ -27,7 +27,6 @@ the latest master builds [here](https://grafana.com/grafana/download)
### Dependencies
- Go (Latest Stable)
- bra [`go get github.com/Unknwon/bra`]
- Node.js LTS
- yarn [`npm install -g yarn`]
@@ -40,23 +39,6 @@ go get github.com/grafana/grafana
cd $GOPATH/src/github.com/grafana/grafana
```
### Building
#### The backend
```bash
go run build.go setup
go run build.go build
```
#### Frontend assets
_For this you need Node.js (LTS version)._
```bash
yarn install --pure-lockfile
```
### Run and rebuild on source change
#### Backend
@@ -64,7 +46,7 @@ yarn install --pure-lockfile
To run the backend and rebuild on source change:
```bash
$GOPATH/bin/bra run
make run
```
#### Frontend
@@ -93,6 +75,23 @@ yarn jest
**Open grafana in your browser (default: e.g. `http://localhost:3000`) and login with admin user (default: `user/pass = admin/admin`).**
### Building
#### The backend
```bash
go run build.go setup
go run build.go build
```
#### Frontend assets
_For this you need Node.js (LTS version)._
```bash
yarn install --pure-lockfile
```
### Building a Docker image
There are two different ways to build a Grafana docker image. If your machine is setup for Grafana development and you run linux/amd64 you can build just the image. Otherwise, there is the option to build Grafana completely within Docker.