-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
52 lines (43 loc) · 1.04 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
.SILENT:
.PHONY: help
# Based on https://gist.github.com/prwhite/8168133#comment-1313022
## This help screen
help:
printf "Available commands\n\n"
awk '/^[a-zA-Z\-\_0-9]+:/ { \
helpMessage = match(lastLine, /^## (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")-1); \
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
printf "\033[33m%-40s\033[0m %s\n", helpCommand, helpMessage; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
## Install bundler
bundler-install:
sudo gem install bundler
.PHONY: bundler-install
## Update Bundler
bundler-update:
sudo gem update bundler
.PHONY: bundler-update
## Update rubygems
gems-update:
gem update --system
.PHONY: gems-update
## Update bundle packages
update: bundler-update gems-update
bundle update github-pages
.PHONY: update
## Install bundle packages
install: bundler-install bundler-update gems-update
bundle install
.PHONY: install
## Build website
build:
bundle exec jekyll build
.PHONY: build
## Serve website
serve:
bundle exec jekyll serve
.PHONY: serve