Commit 33033ca4 authored by Zach van Rijn's avatar Zach van Rijn
Browse files

Revert "Use different sass compiler. Enable atomic update."

This reverts commit 0aa41b28.
parent 0aa41b28
all:
site:
image:
docker build . -t sassypants
sass:
docker run -u$(shell id -u):$(shell id -g) -v$(CURDIR)/assets/css:/tmp -w /tmp --rm -it sassypants sassc -t compressed scss/theme.scss theme.css
site: # sass
$(CURDIR)/publish
#!/bin/sh -e
HERE=$(dirname $(readlink -f ${0}));
cd ${HERE};
rm -f theme.css;
#===============================================================
docker run -v$(pwd):/x -w/x --rm -i node:16.5.0-alpine3.14 sh <<'EOF'
apk update;
apk upgrade;
apk add git;
#===============================================================
cd /tmp;
git clone https://github.com/sass/sass.git;
cd sass;
git checkout 2121f939b411c1650005b82c53557dd6248bff74;
npm audit fix;
npm install;
npm install -g sass;
cd /x;
sass --no-source-map scss/theme.scss theme.css;
chown 1000:1000 theme.css;
#===============================================================
EOF
#===============================================================
This diff is collapsed.
......@@ -3,13 +3,8 @@
HERE=$(dirname $(readlink -f ${0}))/src;
HTML=html;
TEMP=$(mktemp -d);
rm -f ${HTML}.tgz;
##
# Styles
#
(cd assets/css && ./compile.sh)
rm -fr ${HTML} ${HTML}.tgz;
mkdir ${HTML};
##
# Logo
......@@ -21,8 +16,8 @@ rm -f ${HTML}.tgz;
#
find ${HERE} -type f -name "*.psd" | while read k; do
f="${k#*${HERE}}";
mkdir -p "${TEMP}${f%/*}";
convert "${k}[0]" -strip "${TEMP}${f%*.psd}.jpg";
mkdir -p "${HTML}${f%/*}";
convert "${k}[0]" -strip "${HTML}${f%*.psd}.jpg";
done
##
......@@ -30,8 +25,8 @@ done
#
find ${HERE} -type f -name "*.html" | while read k; do
f="${k#*${HERE}}";
mkdir -p "${TEMP}${f%/*}";
sed > "${TEMP}${f}" "${k}" \
mkdir -p "${HTML}${f%/*}";
sed > "${HTML}${f}" "${k}" \
-e "/__HEADER__/r ${HERE}/header.fill" \
-e 's/__HEADER__//g' \
-e "/__FOOTER__/r ${HERE}/footer.fill" \
......@@ -46,24 +41,17 @@ done
##
# static assets
#
cp -R ${HERE}/../assets ${TEMP};
cp -R ${HERE}/../assets ${HTML};
##
#
#
cp ${HERE}/robots.txt ${TEMP};
cp ${HERE}/robots.txt ${HTML};
##
# payload
#
(
cd ${TEMP};
cd ${HTML};
tar -pczf ../${HTML}.tgz .;
)
##
# Cutover.
#
rm -fr ${HTML};
mv ${TEMP} ${HTML};
chmod 755 ${HTML};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment