9759a4c3a3
- Create scripts/build, scripts/test, scripts/run, scripts/install-hooks - Create git-hooks/pre-commit (auto-format staged .hs files) - Create git-hooks/pre-push (check formatting + hlint before push) - Handle git worktrees correctly in hook installation - Run fourmolu on all source files to fix existing formatting
13 lines
293 B
Python
Executable File
13 lines
293 B
Python
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
|
|
|
echo "Formatting with fourmolu..."
|
|
./hs fourmolu --mode inplace app/ src/ test/
|
|
|
|
echo "Linting with hlint..."
|
|
./hs hlint app/ src/ test/
|
|
|
|
echo "Building..."
|
|
./hs stack build --copy-bins --local-bin-path /work/build
|