38 lines
898 B
Bash
38 lines
898 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# Canonical build flags (GOFLAGS=-tags=gms_pure_go, CGO_ENABLED=1).
|
|
# shellcheck source=../.buildflags
|
|
source "$(dirname "$0")/../.buildflags"
|
|
|
|
echo "๐ง Building bd from source..."
|
|
go build -o bd ./cmd/bd
|
|
|
|
echo "๐ฆ Installing bd globally..."
|
|
sudo mv bd /usr/local/bin/bd
|
|
sudo chmod +x /usr/local/bin/bd
|
|
|
|
echo "โ
Verifying bd installation..."
|
|
bd version
|
|
|
|
echo "๐ฏ Initializing bd (non-interactive)..."
|
|
if [ ! -f .beads/beads.db ]; then
|
|
bd init --quiet
|
|
else
|
|
echo "bd already initialized"
|
|
fi
|
|
|
|
echo "๐ช Installing git hooks..."
|
|
if [ -f examples/git-hooks/install.sh ]; then
|
|
bash examples/git-hooks/install.sh
|
|
echo "Git hooks installed successfully"
|
|
else
|
|
echo "โ ๏ธ Git hooks installer not found, skipping..."
|
|
fi
|
|
|
|
echo "๐ Installing Go dependencies..."
|
|
go mod download
|
|
|
|
echo "โจ Development environment ready!"
|
|
echo "Run 'bd ready' to see available tasks"
|