2024-11-14 10:46:41 +00:00
|
|
|
build:
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
cargo fmt
|
|
|
|
cargo fmt --check
|
|
|
|
cargo hack clippy
|
|
|
|
cargo hack build
|
|
|
|
cargo hack test
|
|
|
|
cargo doc
|
|
|
|
# cargo test --example get
|
2024-11-22 16:07:37 +00:00
|
|
|
# cargo mutants --jobs 4
|
2024-11-14 10:46:41 +00:00
|
|
|
|
2024-04-06 17:47:30 +01:00
|
|
|
install-hooks:
|
|
|
|
@echo "Installing git hooks"
|
2024-05-11 11:11:13 +01:00
|
|
|
cargo install cc-cli
|
2024-04-06 17:47:30 +01:00
|
|
|
git config core.hooksPath .git-hooks
|
2024-04-13 12:02:53 +01:00
|
|
|
|
|
|
|
validate-dev-branch:
|
2024-08-10 18:20:56 +01:00
|
|
|
git rebase -i origin/main -x 'just mock-ci'
|
|
|
|
|
|
|
|
mock-ci:
|
|
|
|
cargo fmt --check
|
2024-08-12 09:44:35 +01:00
|
|
|
cargo hack --feature-powerset build
|
|
|
|
cargo hack --feature-powerset test
|
|
|
|
cargo hack --feature-powerset clippy
|
2024-04-15 17:23:05 +01:00
|
|
|
|
|
|
|
start-ngrok:
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Uses NGROK_DOMAIN env var if available
|
|
|
|
if test -z ${NGROK_DOMAIN} ; then
|
|
|
|
ngrok http 8080
|
|
|
|
else
|
|
|
|
ngrok http --domain=${NGROK_DOMAIN} 8080
|
|
|
|
fi
|
2024-05-17 18:49:00 +01:00
|
|
|
|
2024-08-30 08:17:10 +01:00
|
|
|
start-mac-tunnel:
|
|
|
|
ssh dagon -R7777:localhost:8888
|
2024-09-01 06:35:55 +01:00
|
|
|
@echo "Mac Tunnel has closed"
|
2024-08-30 08:17:10 +01:00
|
|
|
|
2024-05-23 07:34:10 +01:00
|
|
|
coverage-update:
|
2024-05-17 18:49:00 +01:00
|
|
|
cargo tarpaulin --lib --out html
|
2024-05-23 07:34:10 +01:00
|
|
|
echo "Now:\n\topen tarpaulin-report.html"
|
2024-06-04 07:16:23 +01:00
|
|
|
|
2024-06-04 18:30:11 +01:00
|
|
|
coverage crate test:
|
|
|
|
cargo tarpaulin -p {{crate}} --lib --out html -- {{test}}
|
|
|
|
# cargo tarpaulin --skip-clean -p {{crate}} --lib --out html -- {{test}}
|
|
|
|
|
2024-06-04 07:16:23 +01:00
|
|
|
grcov-coverage:
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
# an alternate coverage report
|
|
|
|
rustup component add llvm-tools-preview
|
|
|
|
export RUSTFLAGS="-Cinstrument-coverage"
|
|
|
|
cargo build
|
|
|
|
export LLVM_PROFILE_FILE="git-next-%p-%m.profraw"
|
|
|
|
cargo test
|
|
|
|
echo "Building report..."
|
|
|
|
grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/
|
|
|
|
find . -name '*.profraw' -exec rm "{}" \;
|
|
|
|
echo "Now:\n\topen target/debug/coverage/index.html"
|
2024-07-14 10:40:47 +01:00
|
|
|
|
2024-09-13 18:59:35 +01:00
|
|
|
docker-build-builder:
|
|
|
|
docker build -t git.kemitix.net/kemitix/git-next-builder:2024.08.04 -f Dockerfile.builder .
|
|
|
|
|
|
|
|
docker-build: docker-build-builder
|
|
|
|
docker build -t git.kemitix.net/kemitix/git-next:latest .
|
|
|
|
|
|
|
|
docker-run: docker-build
|
|
|
|
docker run -it -p "7777:8888" -v .:/app/ git.kemitix.net/kemitix/git-next:latest server start --ui
|
2024-09-14 12:22:29 +01:00
|
|
|
|
|
|
|
run *args:
|
|
|
|
cargo run -- {{ args }}
|
|
|
|
|
|
|
|
run-ui:
|
|
|
|
just run server start --ui
|