forked from anistark/feluda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
56 lines (47 loc) · 1.49 KB
/
justfile
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
# Variables
CRATE_NAME := "feluda"
VERSION := `cargo pkgid | cut -d# -f2 | cut -d: -f2`
GITHUB_REPO := "anistark/feluda"
# Build the crate
build:
@echo "🚀 Building release version..."
cargo build --release
# Create the crate package (to validate before publishing)
package:
@echo "📦 Creating package for validation..."
cargo package
# Test the release build
test-release:
@echo "🧪 Testing the release build..."
cargo test --release
# Create a release on GitHub
gh-release:
@echo "📢 Creating GitHub release for version {{VERSION}}"
gh release create {{VERSION}}
# Release the crate to Homebrew
homebrew-release:
@echo "🍺 Releasing {{CRATE_NAME}} to Homebrew..."
brew tap-new {{GITHUB_REPO}}
brew create --tap {{GITHUB_REPO}} https://github.com/{{GITHUB_REPO}}/archive/refs/tags/{{VERSION}}.tar.gz
brew install --build-from-source {{GITHUB_REPO}}/{{CRATE_NAME}} --formula
# Release the crate to Debian APT
debian-release:
@echo "📦 Releasing {{CRATE_NAME}} to Debian APT..."
debmake -b -u {{VERSION}} -n {{CRATE_NAME}}
dpkg-buildpackage -us -uc
dput ppa:your-ppa-name ../{{CRATE_NAME}}_{{VERSION}}_source.changes
# Publish the crate to crates.io
publish:
just build
just test-release
just package
cargo publish
just gh-release
# Clean up the build artifacts
clean:
@echo "🧹 Cleaning up build artifacts..."
cargo clean
# Login to crates.io
login:
@echo "🔑 Logging in to crates.io..."
cargo login