-
Notifications
You must be signed in to change notification settings - Fork 0
/
d
executable file
·31 lines (24 loc) · 956 Bytes
/
d
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
#!/usr/bin/env bash
if [ $# -gt 0 ]; then
if [ "$1" == "install" ] || [ "$1" == "i" ]; then
JEKYLL_ENV=production bundle config path vendor/bundle
JEKYLL_ENV=production bundle install --jobs 4 --retry 3
elif [ "$1" == "update" ] || [ "$1" == "u" ]; then
JEKYLL_ENV=production bundle u
elif [ "$1" == "up" ] || [ "$1" == "serve" ]; then
JEKYLL_ENV=production bundle exec jekyll s --config _config.yml,__dev.yml
elif [ "$1" == "build" ] || [ "$1" == "b" ]; then
if [ ${JEKYLL_ENV} == 'production' ]; then
# explicitly add JEKYLL_ENV=production to generate public
JEKYLL_ENV=production bundle exec jekyll b --config _config.yml,__prod.yml
else
JEKYLL_ENV=development bundle exec jekyll b --config _config.yml,__dev.yml
fi
else
JEKYLL_ENV=production bundle "$@"
fi
else
which ruby
which bundle
JEKYLL_ENV=production bundle exec jekyll -v
fi