-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
89 lines (64 loc) · 1.87 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
set shell := ["nu", "-c"]
# use this if don't have nushell installed
# set shell := ["powershell.exe", "-c"]
# set shell := ["zsh", "-uc"]
bt := '0'
export RUST_BACKTRACE := bt
log := "warn"
export JUST_LOG := log
default:
@just --list
# create a nix shell with all tools needed for development
shell:
nix develop . --command "nu"
run:
cargo run
build:
cargo build --target x86_64-unknown-linux-musl
release-build-apple:
cargo +nightly build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target aarch64-apple-darwin --release
compress-build-apple:
upx --best --lzma target/aarch64-apple-darwin/release/buklo
timings:
cargo build --timings
release:
cargo build --release --target x86_64-unknown-linux-musl
build-linux:
cargo +nightly build -Z build-std=std,panic_abort --target x86_64-unknown-linux-musl --release
fmt:
cargo fmt --all
spellcheck:
cargo spellcheck check
# add git log messages to changelog
changes:
git log --pretty=format:%s >> CHANGELOG.md
# install buklo from crates.io
install:
cargo install -f buklo
# install development dependencies
install-dev-deps:
rustup install nightly
rustup update nightly
cargo +nightly install cargo-fuzz
cargo install cargo-check
cargo install cargo-limit
cargo install cargo-watch
npm install -g @commitlint/cli @commitlint/config-conventional
# count non-empty lines of code
sloc:
@cat src/*.rs | sed '/^\s*$/d' | wc -l
fuzz:
cargo +nightly fuzz run fuzz-compiler
# publish current GitHub master branch
publish:
#!/usr/bin/env bash
set -euxo pipefail
rm -rf tmp/release
git clone [email protected]:ghishadow/buklo.git tmp/release
VERSION=`sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1`
cd tmp/release
#git tag -a $VERSION -m "Release $VERSION"
git push origin $VERSION
cargo publish
cd ../..
rm -rf tmp/release