Skip to content

Commit 02d7660

Browse files
committed
Add hugo installation in dev-setup
Signed-off-by: Justin Zhang <[email protected]>
1 parent c8c9a25 commit 02d7660

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

dev-setup.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
#!/bin/bash
22

3+
function install_required_hugo {
4+
if command -v hugo; then
5+
VER=$(hugo version | cut -d' ' -f2 | cut -d'-' -f1)
6+
if [[ $VER != "v0.145.0" ]]; then
7+
echo "Unsupported hugo version: $VER, please install hugo v0.145.0" 1>&2
8+
exit 2
9+
fi
10+
else
11+
go install github.com/gohugoio/[email protected]
12+
fi
13+
}
14+
315
function check_python_pkg {
416
python -c "import $1" >/dev/null 2>&1
517
}
618

719
# fail fast by exiting on first error
820
set -e
921

22+
install_required_hugo
23+
1024
# Install uv and create a project-scoped venv with pre-commit installed
1125
export PATH="$HOME/.local/bin:$PATH"
1226
ret=$(command -v uv)

0 commit comments

Comments
 (0)