Makefile 881 Bytes
Newer Older
1 2
-include local/Makefile

3 4
all: deps build

Dan Cech committed
5
deps-go:
6
	go run build.go setup
Dan Cech committed
7

8
deps-js: node_modules
9

10
deps: deps-js
Dan Cech committed
11 12

build-go:
13
	go run build.go build
Dan Cech committed
14

15 16 17 18 19 20
build-server:
	go run build.go build-server

build-cli:
	go run build.go build-cli

Dan Cech committed
21
build-js:
22
	yarn run build
23

Dan Cech committed
24 25
build: build-go build-js

26 27
build-docker-dev:
	@echo "\033[92mInfo:\033[0m the frontend code is expected to be built already."
28
	go run build.go -goos linux -pkg-arch amd64 ${OPT} build pkg-archive latest
29 30 31
	cp dist/grafana-latest.linux-x64.tar.gz packaging/docker
	cd packaging/docker && docker build --tag grafana/grafana:dev .

32 33 34
build-docker-full:
	docker build --tag grafana/grafana:dev .

Dan Cech committed
35
test-go:
36
	go test -v ./pkg/...
Dan Cech committed
37 38

test-js:
39
	yarn test
40

Dan Cech committed
41 42
test: test-go test-js

43 44
run:
	./bin/grafana-server
45 46 47 48 49 50 51

clean:
	rm -rf node_modules
	rm -rf public/build

node_modules: package.json yarn.lock
	yarn install --pure-lockfile --no-progress