Commit 86b90a2768
Unsigned
Layout: unified · split
build.sh +12 −15
| @@ -3,22 +3,19 @@ | |||
| 3 | printf "Did you update the 'Recent Blog Posts' section? [yn] " | 3 | printf "Did you update the 'Recent Blog Posts' section? [yn] " |
| 4 | read answer | 4 | read answer |
| 5 | 5 | ||
| 6 | if [ "$answer" != "${answer#[Yy]}" ] ; then | 6 | if [[ "$answer" =~ ^[Yy]$ ]]; then |
| 7 | if [ "$ENV" == "prod" ]; then | 7 | if [[ "$ENV" == "prod" ]]; then |
| 8 | echo "Environment: Production" && \ | 8 | echo "Environment: Production" |
| 9 | rm -rf .build/* && \ | 9 | rm -rf .build/* |
| 10 | emacs --script publish.el &>/dev/null && \ | 10 | emacs --script publish.el &>/dev/null |
| 11 | minify -o theme/static/styles.min.css \ | 11 | minify -o theme/static/styles.min.css theme/static/styles.css |
| 12 | theme/static/styles.css && \ | 12 | rsync -r --delete-before .build/* ubuntu:/var/www/cleberg.net/ |
| 13 | rsync -r --delete-before .build/* \ | ||
| 14 | ubuntu:/var/www/cleberg.net/ | ||
| 15 | else | 13 | else |
| 16 | echo "Environment: Development" && \ | 14 | echo "Environment: Development" |
| 17 | rm -rf .build/* && \ | 15 | rm -rf .build/* |
| 18 | emacs --script publish.el && \ | 16 | emacs --script publish.el |
| 19 | minify -o theme/static/styles.min.css \ | 17 | minify -o theme/static/styles.min.css theme/static/styles.css |
| 20 | theme/static/styles.css && \ | 18 | cd .build/ |
| 21 | cd .build/ && \ | ||
| 22 | python3 -m http.server | 19 | python3 -m http.server |
| 23 | fi | 20 | fi |
| 24 | else | 21 | else |