-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
66 lines (59 loc) · 1.93 KB
/
Copy pathjustfile
File metadata and controls
66 lines (59 loc) · 1.93 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# llmsim development recipes
# Show available recipes
default:
@just --list
# Run all pre-PR checks (fmt, clippy, test)
check:
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test
# Format all code
fmt:
cargo fmt --all
# Run the server locally
run *ARGS:
cargo run -- {{ARGS}}
# Prepare a release: bump version and remind about changelog
release-prepare version:
#!/usr/bin/env bash
set -euo pipefail
CURRENT=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
echo "Current version: $CURRENT"
echo "New version: {{version}}"
sed -i 's/^version = "'"$CURRENT"'"/version = "{{version}}"/' Cargo.toml
echo ""
echo "Updated Cargo.toml to version {{version}}"
echo ""
echo "Next steps:"
echo " 1. Update CHANGELOG.md with a new ## [{{version}}] section"
echo " 2. Run: just release-check"
echo " 3. Commit with: chore(release): prepare v{{version}}"
# Run release verification checks (fmt, clippy, test, dry-run publish)
release-check:
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test
cargo publish --dry-run
@echo ""
@echo "All release checks passed."
# Create and push a release tag after verifying version consistency
release-tag:
#!/usr/bin/env bash
set -euo pipefail
# Verify clean working tree
if [ -n "$(git status --porcelain)" ]; then
echo "Error: Working tree is not clean. Commit or stash changes first."
exit 1
fi
VERSION=$(grep '^version = ' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
TAG="v$VERSION"
# Check if tag already exists
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Error: Tag $TAG already exists"
exit 1
fi
echo "Creating tag $TAG..."
git tag -a "$TAG" -m "Release $TAG"
echo "Pushing tag $TAG..."
git push origin "$TAG"
echo "Tag $TAG created and pushed."