-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (35 loc) · 865 Bytes
/
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
.PHONY: init test clean deploy
REMOTE := origin
REPO_URI := git@github.com:stav/timelion.git
REPO_REMOTE := $(shell git remote)
RENDER_DIR := cowboy:/srv/default/htdocs/timetigr
init:
@echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@echo ~Initializing
# Need to init remote:
# git init --bare
ifeq ($(REPO_REMOTE),)
@echo Remote is empty
else
-git remote rm $(REPO_REMOTE)
endif
git remote add $(REMOTE) $(REPO_URI)
git fetch $(REMOTE)
git push $(REMOTE) master
git branch --set-upstream-to=$(REMOTE)/master master
test:
@echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@echo ~Testing
npm test
clean:
@echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@echo ~Cleaning
rm -rf ./dist
deploy:
@echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@echo ~Deploying
@make test
@make clean
npm run build
scp -r dist/* $(RENDER_DIR)
git push -u $(REMOTE) master