forked from innius/grafana-simple-grpc-datasource
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (37 loc) · 845 Bytes
/
Makefile
File metadata and controls
51 lines (37 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
SHELL := /bin/bash
######################
# Variables
######################
# Golang environment
GOPATH := $(shell go env GOPATH)
GOBIN := $(GOPATH)/bin
GOINSTALL := go install
######################
# Tools
######################
MAGE := $(GOBIN)/mage
YARN := $(shell command -v yarn 2> /dev/null)
YARN_EXISTS := $(shell [[ "$(YARN)" == "" ]] && echo "false" || echo "true")
$(MAGE):
$(GOINSTALL) github.com/magefile/mage
$(YARN):
ifeq (false, $(YARN_EXISTS))
$(error Missing required binary: yarn)
endif
######################
# Build
######################
.PHONY: build
build: build-node build-go
.PHONY: build-node
build-node:
yarn install && yarn build
.PHONY: build-go
build-go: $(MAGE)
$(MAGE)
######################
# Clean
######################
.PHONY: clean
clean:
git clean -dfx