forked from hshackers/nyc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.tst
42 lines (38 loc) · 1.32 KB
/
Makefile.tst
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
MAIN = ./styles/style.css
DATE = $(shell date +%I:%M\ %p)
CHECK = \033[32m✔\033[39m
HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#
#
# BUILD CSS/JS
#
build:
@echo "\n${HR}"
@echo "Building front-end..."
@echo "Build successfully completed at ${DATE}."
@echo "${HR}\n"
@echo "Script by @nicoespeon,"
@echo "inspired by @mdo's and @fat's Bootstrap Makefile\n"
#
# DEPLOY TO MASTER
#
deploy:
@echo "\n${HR}"
@echo "Deploying website..."
@echo "${HR}\n"
@jekyll build
@echo "Generating files... ${CHECK} Done"
@git checkout master
@echo "Switch to master... ${CHECK} Done"
@sudo cp -r _site/* . && sudo rm -rf _site/ en/_posts/ fr/_posts/ Makefile styles/ _data/ _plugins/ .idea/
@echo "Updating files... ${CHECK} Done"
@git add --all . && git commit -m "Regenerate files (jekyll deployment)"
@echo "Committing files... ${CHECK} Done"
@git checkout develop && sudo git clean -f -d
@echo "Switch back to develop... ${CHECK} Done"
@mkdir _site/ && jekyll build
@echo "Re-generating files... ${CHECK} Done"
@echo "You can run back jekyll server now to follow changes"
@echo "\n${HR}"
@echo "Deployed successfully completed at ${DATE}."
@echo "${HR}\n"
@echo "Script by @nicoespeon"