diff options
author | Christian Cleberg <hello@cleberg.net> | 2025-06-03 19:46:11 -0500 |
---|---|---|
committer | Christian Cleberg <hello@cleberg.net> | 2025-06-03 19:46:11 -0500 |
commit | dae0dc93d9930f3ee0dcfa06aebcb34a952427f7 (patch) | |
tree | 7ac26e14d35e0bb2458f25201810b04fcaa85609 /build.sh | |
parent | 21fdce441200268bd5efebc561956b52b6368d42 (diff) | |
download | cleberg.net-dae0dc93d9930f3ee0dcfa06aebcb34a952427f7.tar.gz cleberg.net-dae0dc93d9930f3ee0dcfa06aebcb34a952427f7.tar.bz2 cleberg.net-dae0dc93d9930f3ee0dcfa06aebcb34a952427f7.zip |
feat: convert build script to python
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/build.sh b/build.sh deleted file mode 100755 index 66887b3..0000000 --- a/build.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -# Ensure the latest post is included on the home page -printf "Did you update the 'Recent Blog Posts' section? [yn] " -read answer - -# Only continue if latest post is included on the home page -if [[ "$answer" =~ ^[Yy]$ ]]; then - # Check if the environment flag is set to PROD - if [[ "$ENV" == "prod" ]]; then - echo "Environment: Production" - - # Check if publishing via LAN or remotely - printf "Publishing on remote or LAN? [r|l] " - - # Update ubuntu_server variable based on answer - read method - if [[ "$method" =~ ^[Rr]$ ]]; then - ubuntu_server="ubuntu-remote" - elif [[ "$method" =~ ^[Ll]$ ]]; then - ubuntu_server="ubuntu" - else - echo "Invalid input. Assuming LAN (ubuntu)" - ubuntu_server="ubuntu" - fi - - # Remove previous build - rm -rf .build/* - - # Minify CSS - minify -o theme/static/styles.min.css theme/static/styles.css - - # Run publishing script - emacs --script publish.el &>/dev/null - - # Deploy changes - rsync -r --delete-before .build/* $ubuntu_server:/var/www/cleberg.net/ - else - echo "Environment: Development" - - # Remove previous build - rm -rf .build/* - - # Minify CSS - minify -o theme/static/styles.min.css theme/static/styles.css - - # Run publishing script - emacs --script publish.el - - # Launch development web server - cd .build/ - python3 -m http.server - fi -else - echo "Please update the 'Recent Blog Posts' section before publishing!" -fi |