-
Notifications
You must be signed in to change notification settings - Fork 1
/
Justfile
63 lines (47 loc) · 1.35 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
set dotenv-load := false
export RUSTFLAGS := "-Lbuild"
bootstrap:
cargo install checkexec cargo-criterion
git submodule update --init --recursive
help:
@just --list --unsorted
build:
cargo build
alias b := build
run *args:
cargo run {{args}}
alias r := run
release:
cargo build --release
install:
cargo install --path .
test *args: build-murmur3c
cargo test {{args}} --features murmur3c
check:
cargo check
alias c := check
bench:
cargo criterion --features murmur3c
fix:
cargo clippy --fix
# Bump version. level=major,minor,patch
version level:
git diff-index --exit-code HEAD > /dev/null || ! echo You have untracked changes. Commit your changes before bumping the version.
cargo set-version --bump {{level}}
cargo update # This bumps Cargo.lock
VERSION=$(rg "version = \"([0-9.]+)\"" -or '$1' Cargo.toml | head -n1) && \
git commit -am "Bump version {{level}} to $VERSION" && \
git tag v$VERSION && \
git push origin v$VERSION
git push
publish:
cargo publish
patch: test
just version patch
just publish
build-murmur3c:
checkexec -v build/libmurmur3.so murmur3c/murmur3.c -- just _murmur3c
_murmur3c:
mkdir -p build/
cargo clean -p fastmurmur3
export DIR=$(pwd) && cd murmur3c && gcc -shared -O3 -Wall -fPIC -o $DIR/build/libmurmur3.so -c murmur3.c