-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJustfile
More file actions
44 lines (35 loc) · 1023 Bytes
/
Justfile
File metadata and controls
44 lines (35 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Justfile
# https://github.com/casey/just
default:
@just --list
build:
cargo build --release
fmt:
cargo fmt
cargo clippy --all-targets --all-features -- -D warnings
# cargo shear --fix # first install shear: cargo install shear
check:
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
install-hook:
#!/usr/bin/env bash
cat > .git/hooks/pre-commit << 'EOF'
#!/bin/sh
set -e
echo "Running pre-commit quality checks..."
just check
EOF
chmod +x .git/hooks/pre-commit
echo "Pre-commit hook installation confirmed."
remove-hook:
rm .git/hooks/pre-commit
echo "Pre-commit hook uninstallation confirmed."
# Run unit tests
test: fmt
cargo test
# Create a new release tag and push it
release version notes='':
@echo "Tagging release {{version}}..."
git tag -a v{{version}} -m "Release v{{version}}: {{notes}}"
git push origin v{{version}}
@echo "Release tag pushed. GitHub Release will be created via CI."