Created
July 18, 2017 19:38
-
-
Save natanfelles/af50d5064878487a7589b963848da6cd to your computer and use it in GitHub Desktop.
Serve Jekyll According to Environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Natan Felles <[email protected]> | |
# Description: Serve Jekyll According to Environment | |
echo -n "Environment [d = development, p = production]: " | |
read ENV | |
rm -r .sass-cache/ | |
rm -r _site/ | |
rm .jekyll-metadata | |
rm Gemfile.lock | |
if [[ $ENV != "p" ]]; then | |
echo "Building development site:" | |
JEKYLL_ENV=development bundle exec jekyll serve --config _config_dev.yml --incremental | |
else | |
echo "Building production site:" | |
JEKYLL_ENV=production bundle exec jekyll serve --incremental | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment