Skip to content

Commit 6085564

Browse files
committed
Merge pull request grafana#4807 from grafana/makefile
add basic Makefile, remove need for global grunt-cli
2 parents 6bc898b + 650bb4c commit 6085564

File tree

5 files changed

+22
-6
lines changed

5 files changed

+22
-6
lines changed

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
all: deps build
2+
3+
deps:
4+
go run build.go setup
5+
godep restore
6+
npm install
7+
8+
build:
9+
go run build.go build
10+
npm run build
11+
12+
test:
13+
godep go test -v ./pkg/...
14+
npm test
15+
16+
run:
17+
./bin/grafana-server

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ npm (v2.5.0) and grunt (v0.4.5). Run the following:
103103

104104
```bash
105105
npm install
106-
npm install -g grunt-cli
107-
grunt
106+
npm run build
108107
```
109108

110109
### Recompile backend on source change
@@ -145,4 +144,3 @@ please [sign the CLA](http://docs.grafana.org/project/cla/)
145144

146145
Grafana is distributed under Apache 2.0 License.
147146
Work in progress Grafana 2.0 (with included Grafana backend)
148-

build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ func ChangeWorkingDir(dir string) {
306306
}
307307

308308
func grunt(params ...string) {
309-
runPrint("./node_modules/grunt-cli/bin/grunt", params...)
309+
runPrint("./node_modules/.bin/grunt", params...)
310310
}
311311

312312
func setup() {

circle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ test:
2525
# Go test
2626
- godep go test -v ./pkg/...
2727
# js tests
28-
- ./node_modules/grunt-cli/bin/grunt test
28+
- npm test
2929
- npm run coveralls
3030

3131
deployment:
3232
master:
3333
branch: master
3434
owner: grafana
35-
commands:
35+
commands:
3636
- ./trigger_grafana_packer.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"npm": "2.14.x"
6363
},
6464
"scripts": {
65+
"build": "grunt",
6566
"test": "grunt test",
6667
"coveralls": "grunt karma:coveralls && rm -rf ./coverage"
6768
},

0 commit comments

Comments
 (0)