-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathjustfile
More file actions
53 lines (39 loc) · 1.13 KB
/
justfile
File metadata and controls
53 lines (39 loc) · 1.13 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
# Default recipe
default:
@just --list
# Run tests
test:
cargo test
# Build release binary
build:
cargo build --release
# Generate changelog
changelog:
git cliff -o CHANGELOG.md
# Release a new version
release version:
#!/usr/bin/env bash
set -euo pipefail
VERSION="{{version}}"
# Validate version format
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Version must be in format X.Y.Z (e.g., 0.1.0)"
exit 1
fi
echo "Releasing v$VERSION..."
# Update Cargo.toml
sed -i "s/^version = \".*\"/version = \"$VERSION\"/" Cargo.toml
# Update PKGBUILD
sed -i "s/^pkgver=.*/pkgver=$VERSION/" PKGBUILD
# Update Cargo.lock
cargo update -p vuke
# Generate changelog
git cliff --tag "v$VERSION" -o CHANGELOG.md
# Commit changes
git add Cargo.toml Cargo.lock PKGBUILD CHANGELOG.md
git commit -m "chore(release): v$VERSION"
# Create tag
git tag -a "v$VERSION" -m "Release v$VERSION"
echo ""
echo "Release v$VERSION ready!"
echo "Run 'git push && git push --tags' to publish"