default: fmt lint test
build:
cargo build
fmt:
cargo fmt
lint:
cargo clippy --fix --allow-dirty
test:
cargo test
default_runtime := 'podman'
compose-build runtime=default_runtime:
{{runtime}}-compose build
compose-setup runtime=default_runtime:
mkdir -p .server/config
# Use a bare clone of this repo as the server repo for testing
[ ! -e .server/repo/HEAD ] && git clone --bare . .server/repo || true
# Grant current host user access to the repository served by the container
{{runtime}}-compose run --rm git-remote-iroh peer add ${USER}@${HOSTNAME} `git-remote-iroh whoami | cut -d' ' -f1`
# List the peers granted access
{{runtime}}-compose run --rm git-remote-iroh peer
compose-run runtime=default_runtime:
{{runtime}}-compose up