aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-08-09 20:07:39 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-08-09 20:07:39 +0300
commitda869b77087c83597ae14a3b0353d9ce3ba2f932 (patch)
tree009268b8bbcc66678d5cb90a6195c32cfb42ee20
parentserve.sh: add destination directory parameter (diff)
downloadblog-da869b77087c83597ae14a3b0353d9ce3ba2f932.tar.gz
blog-da869b77087c83597ae14a3b0353d9ce3ba2f932.zip
add build.sh
Diffstat (limited to '')
-rw-r--r--_config.yml1
-rw-r--r--build.sh20
2 files changed, 21 insertions, 0 deletions
diff --git a/_config.yml b/_config.yml
index e16ff68..51cbf2f 100644
--- a/_config.yml
+++ b/_config.yml
@@ -3,6 +3,7 @@ plugins:
- jekyll-github-metadata
exclude:
+ - build.sh
- Gemfile
- Gemfile.lock
- LICENSE.txt
diff --git a/build.sh b/build.sh
new file mode 100644
index 0000000..249700b
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+set -o errexit -o nounset -o pipefail
+
+script_name="$( basename -- "${BASH_SOURCE[0]}" )"
+
+case "$#" in
+ 0) ;;
+ 1)
+ dest_dir="$1"
+ ;;
+ *)
+ echo "usage: $script_name [DEST_DIR]" >&2
+ exit 1
+esac
+
+bundle exec jekyll build \
+ --config _config.yml,_config_dev.yml \
+ ${dest_dir+--destination "$dest_dir"} \
+ --drafts