Files
bbaovanc.com/build.sh
BBaoVanC 3c6683bf49 Add version.txt
Could be used in the future for #30
2025-07-05 00:57:32 -05:00

18 lines
414 B
Bash
Executable File

#!/bin/bash -ex
# POSIX sh doesn't have the time command
[ -z "$DEST" ] && DEST="public/"
rm -rf "$DEST"
hugo --printI18nWarnings --printPathWarnings -d "$DEST" $@
echo "$(git branch --show-current)-$(git describe --match='' --always --abbrev=0 --dirty)" > "$DEST"/version.txt
if [ -z "$NO_SEARCH" ]; then
time pagefind --site "$DEST"
fi
if [ -z "$NO_COMPRESS" ]; then
export DEST
./compress.sh
fi