Commit 1b5869f8a8
Unsigned
Layout: unified · split
build.sh +6 −5
| @@ -5,20 +5,21 @@ read answer | |||
| 5 | 5 | ||
| 6 | if [ "$answer" != "${answer#[Yy]}" ] ; then | 6 | if [ "$answer" != "${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 && \ | 10 | emacs --script publish.el &>/dev/null && \ |
| 11 | pandoc -f org -t html readme.org -o readme.html && \ | 11 | pandoc -f org -t html readme.org -o readme.html && \ |
| 12 | hut git update --readme readme.html --repo \ | 12 | hut git update --readme readme.html --repo \ |
| 13 | https://git.sr.ht/\~cyborg/cleberg.net && \ | 13 | https://git.sr.ht/\~cyborg/cleberg.net && \ |
| 14 | rsync -av --delete-before .build/* ubuntu:/var/www/cleberg.net/ | 14 | rsync -r --delete-before .build/* \ |
| 15 | ubuntu:/var/www/cleberg.net/ | ||
| 15 | else | 16 | else |
| 16 | echo "Environment = Development" && \ | 17 | echo "Environment: Development" && \ |
| 17 | rm -rf .build/* && \ | 18 | rm -rf .build/* && \ |
| 18 | emacs --script publish.el && \ | 19 | emacs --script publish.el && \ |
| 19 | cd .build/ && \ | 20 | cd .build/ && \ |
| 20 | python3 -m http.server | 21 | python3 -m http.server |
| 21 | fi | 22 | fi |
| 22 | else | 23 | else |
| 23 | echo No | 24 | echo "Please update the 'Recent Blog Posts' section before publishing!" |
| 24 | fi | 25 | fi |