docker: Fix Dart Sass ARM64 arch mismatch, /cache permissions

Also improve the final build step.

Closes #12956
Closes #12957
Closes #12960
This commit is contained in:
David Karlsson 2024-10-17 15:42:41 +02:00 committed by GitHub
parent b5801d8b6a
commit b5852d0e68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 30 deletions

View file

@ -1,20 +0,0 @@
#!/bin/sh
set -ex
export DART_SASS_VERSION=1.79.3
# If $BUILDARCH=arm64, then we need to install the arm64 version of Dart Sass,
# otherwise we install the x64 version.
ARCH="x64"
if [ "$BUILDARCH" = "arm64" ]; then
ARCH="arm64"
fi
cd /tmp
curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-${ARCH}.tar.gz
ls -ltr
tar -xf dart-sass-${DART_SASS_VERSION}-linux-${ARCH}.tar.gz
rm dart-sass-${DART_SASS_VERSION}-linux-${ARCH}.tar.gz && \
# The dart-sass folder is added to the PATH by the caller.
mv dart-sass /var/hugo/bin