jakstys.lt/scripts/build
2022-04-26 05:48:58 +03:00

19 lines
698 B
Bash
Executable File

#!/bin/bash
set -xeuo pipefail
cd "$(git rev-parse --show-toplevel)/jakstys.lt"
hugo --cleanDestinationDir --printPathWarnings --panicOnWarning --log
hugo --cleanDestinationDir --printPathWarnings --panicOnWarning --log \
--buildDrafts --config config.yaml,debugconfig.yaml -d public/zz
cd public
zopfli=$(bazel run --ui_event_filters=-info,-stdout,-stderr --noshow_progress --run_under=echo @zopfli//:zopfli)
brotli=$(bazel run --ui_event_filters=-info,-stdout,-stderr --noshow_progress --run_under=echo @brotli//:brotli)
find . \
-name '*.html' -or \
-name '*.xml' -or \
-name '*.txt' -or \
-name '*.css' -or \
-name '*.map' | parallel --eta "$zopfli {} && $brotli {}"