-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
63 lines (50 loc) · 1.49 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
58
59
60
61
62
# sisimai.github.io/Makefile
# __ __ _ __ _ _
# | \/ | __ _| | _____ / _(_) | ___
# | |\/| |/ _` | |/ / _ \ |_| | |/ _ \
# | | | | (_| | < __/ _| | | __/
# |_| |_|\__,_|_|\_\___|_| |_|_|\___|
# -----------------------------------------------------------------------------
SHELL := /bin/sh
TIME := $(shell date '+%s')
NAME := sisimai.github.io
WGET := wget -c
CURL := curl -LOk
CHMOD := chmod
PORT := 4401
GEM := gem
CP := cp
RM := rm -f
.DEFAULT_GOAL = git-status
REPOS_TARGETS = git-status git-push git-commit-amend git-tag-list git-diff \
git-reset-soft git-rm-cached git-branch
DEPENDENCIES = jekyll-sitemap jekyll-redirect-from
# -----------------------------------------------------------------------------
.PHONY: clean
preview:
open -a 'Google Chrome' ./index.html
open-the-page:
open -a 'Google Chrome' 'http://localhost:$(PORT)/'
sitemap:
open -a 'Google Chrome' 'https://www.xml-sitemaps.com'
start-server:
jekyll clean
jekyll server --watch -I -P $(PORT) -H 127.0.0.1 --config ./_config.yml
stop-server:
kill -TERM `ps axu | grep 'jekyll server' | grep -v grep | awk '{ print $$2 }'`
jekyll clean
restart-server:
$(MAKE) stop-server
sleep 1
$(MAKE) start-server
depend:
gem install $(DEPENDENCIES)
$(REPOS_TARGETS):
$(MAKE) -f Repository.mk $@
diff push branch:
@$(MAKE) git-$@
fix-commit-message: git-commit-amend
cancel-the-latest-commit: git-reset-soft
remove-added-file: git-rm-cached
clean:
find . -name '.DS_Store' -type f -delete