Files
jobboard/deploy/wsl-setup.sh
T

23 lines
932 B
Bash

#!/bin/sh
# Once, inside the distro, for a checkout that lives in WSL: line endings, the
# Linux .venv, and a test run to prove it works. deploy/wsl-setup.ps1 is the
# Windows half. See docs/Install WSL.md, section 9 and Working from Windows.
# Usage: sh deploy/wsl-setup.sh (from the checkout root)
set -eu
export PATH="$HOME/.local/bin:$PATH"
# Windows Git (PyCharm) has core.autocrlf=true, so it writes CRLF into the
# working tree, and Linux Git then reports every line of those files changed.
# The repository's own setting wins over the Windows one for both.
git config core.autocrlf false
if [ -n "$(git diff --ignore-cr-at-eol --name-only)" ]; then
echo "uncommitted changes beyond line endings - commit or stash them first:" >&2
git diff --ignore-cr-at-eol --stat >&2
exit 1
fi
# Rewrites the CRLF copies with LF. Nothing else differs, checked above.
git checkout -- .
uv sync --all-extras
uv run pytest -q