-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdo.sh
executable file
·60 lines (49 loc) · 940 Bytes
/
do.sh
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
#!/bin/sh
print_info() {
printf "\e[1;35m$1\e[0m - \e[0;37m$2\e[0m\n"
}
help() {
print_info help "Display callable targets"
print_info up "Start Docker containers"
print_info down "Stop and destroy running containers"
print_info clean "Stop and aggressively remove everything"
print_info init "Install gems"
print_info update "Update all gems"
print_info build "Build site files"
print_info run "Start the web server"
print_info server_clean "Clean build artifacts"
}
up() {
docker compose up -d --build
}
down() {
docker compose down
}
clean() {
docker compose down --rmi 'all' -v --remove-orphans
docker container prune -f
docker image prune -af
docker volume prune -f
docker system prune -f
}
init() {
bundle install
}
update() {
bundle update --all
}
build() {
jekyll b --disable-disk-cache
}
run() {
jekyll s
}
server_clean() {
jekyll clean
rm -f Gemfile.lock
}
if [ ${1:+x} ]; then
$1
else
help
fi