1
Fork 0
jakstys.lt/scripts/build

20 lines
748 B
Plaintext
Raw Normal View History

2022-04-12 09:54:44 +03:00
#!/bin/bash
set -xeuo pipefail
cd "$(git rev-parse --show-toplevel)/jakstys.lt"
2022-04-12 13:30:08 +03:00
hugo --cleanDestinationDir --printPathWarnings --panicOnWarning --log
2022-04-26 05:49:48 +03:00
# https://github.com/gohugoio/hugo/issues/8734
#hugo --cleanDestinationDir --printPathWarnings --panicOnWarning --log \
# --buildDrafts --config config.yaml,debugconfig.yaml -d public/zz
2022-04-12 09:54:44 +03:00
cd public
2022-04-12 13:21:01 +03:00
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)
2022-04-12 09:54:44 +03:00
find . \
-name '*.html' -or \
-name '*.xml' -or \
-name '*.txt' -or \
-name '*.css' -or \
2022-04-26 05:44:17 +03:00
-name '*.map' | parallel --eta "$zopfli {} && $brotli {}"