Initial commit: converge - auto-sync git repo watcher
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# Thin wrapper to run Haskell tooling (stack, hpack, fourmolu, hlint, ...)
|
||||
# inside the flipstone/haskell-tools Docker image. Usage: ./hs <cmd> [args]
|
||||
# e.g. ./hs stack build, ./hs stack test, ./hs hpack
|
||||
set -euo pipefail
|
||||
|
||||
IMAGE="${CONVERGE_HASKELL_TOOLS_IMAGE:-ghcr.io/flipstone/haskell-tools:debian-ghc-9.10.3-5d6640d}"
|
||||
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
STACK_ROOT_HOST="${PROJECT_DIR}/.stack-root"
|
||||
|
||||
mkdir -p "${STACK_ROOT_HOST}"
|
||||
|
||||
exec docker run --rm -i $([ -t 0 ] && printf -- -t) \
|
||||
-v "${PROJECT_DIR}:/work" \
|
||||
-v "${STACK_ROOT_HOST}:/stack-root" \
|
||||
-e STACK_ROOT=/stack-root \
|
||||
-w /work \
|
||||
"${IMAGE}" \
|
||||
"$@"
|
||||
Reference in New Issue
Block a user