-
Notifications
You must be signed in to change notification settings - Fork 32
/
Make.zsh
43 lines (34 loc) · 898 Bytes
/
Make.zsh
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
# Note: This is a personal Makefile that I use with a private tool called 'my-make'.
out_debug=./out/debug
out_release=./out/release
build() {
mkdir -p ${out_debug}
RUST_LOG=site=info site build --root-dir . --config=config.toml --out-dir ${out_debug}
}
build_release() {
mkdir -p ${out_release}
RUST_LOG=site=info site build --root-dir . --config=config-release.toml --out-dir ${out_release}
}
git_sync() {
git init
git remote add origin [email protected]:hayatoito/hayatoito.github.io.git
git fetch --filter=blob:none
git reset origin/main
}
dev() {
build
serve &
watch
}
watch() {
watchman-make -p 'src/**' 'template/**' --make my-make -t build
}
serve() {
cd ${out_debug} && my-http-server-run --watch --port 8000
}
clean() {
[[ -d ${out_debug} ]] && rm -rf ${out_debug} || true
}
clean_release() {
[[ -d ${out_release} ]] && rm -rf ${out_release} || true
}