Commit 86b90a2768

86b90a2768ba25c62333c2c83d96a675244d4a4f

parent: 9007704c4b

Unsigned

cmc <hello@cleberg.net> · 2024-10-31 14:57 UTC

enhance build script

Layout: unified · split

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