forked from Reportr/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (46 loc) · 1.19 KB
/
Makefile
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
51
52
53
54
55
56
57
SHELL = bash
NODE = $(shell which node)
NPM = $(shell which npm)
HR = node_modules/.bin/hr.js
FOREMAN = foreman
BROWSERIFY = node_modules/.bin/browserify
.PHONY: all
all: build clientlib run
build:
@echo ==== Build dashboard client ====
$(HR) -d client build
@echo
install:
ifeq ($(NPM),)
@echo -e "npm not found.\nInstall it from https://npmjs.org/"
@exit 1
else
$(NPM) install .
endif
clientlib:
@echo ==== Build API library ====
$(BROWSERIFY) -r ./reportr.js -o ./public/api.js
@echo
chrome: clientlib
@echo ==== Build chrome extension ====
cp ./public/api.js ./thirdparty/javascript/chrome/src/reportr.js
cd thirdparty/javascript/chrome && zip -ru ../../../chrome-extension.zip ./*
@echo
mode-free:
@echo ==== Change Procfile to Procfile-free ====
cp -f ./Procfile-free ./Procfile
git add ./Procfile
git commit -m "Change deployment procfile"
mode-normal:
@echo ==== Change Procfile to Procfile-normal ====
cp -f ./Procfile-free ./Procfile
git add ./Procfile
git commit -m "Change deployment procfile"
deploy:
@echo ==== Check Procfile ====
$(FOREMAN) check
@echo ==== Deploy to Heroku ====
git push heroku master
run:
@echo ==== Run application with foreman ====
$(FOREMAN) start