-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.justfile
47 lines (39 loc) · 1.07 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
[private]
@default:
just --list
# Run checks
check:
cargo fmt --check
cargo clippy -- -D warnings
@just test
# Run tests
test what='--workspace':
cargo nextest run {{what}}
build-deploy ssh ssh-path post-deploy-ssh-script: check
@just build-release
@just deploy '{{ssh}}:{{ssh-path}}'
ssh '{{ssh}}' '{{post-deploy-ssh-script}}'
# Add new migration
add-migrate name:
sqlx migrate add '{{ name }}'
# Bump package and bot versions in Cargo.toml
bump package bot:
@# https://github.com/ceejbot/tomato
tomato set 'workspace.package.version' {{package}} Cargo.toml
tomato set 'package.metadata.bot.version' {{bot}} Cargo.toml
cargo c
# enter shell with dependencies
shell:
nix develop --profile flake.drv ".#"
# Build for prod using cross
[private]
build-release:
@# disabling sccache and clang linker
cross b --release \
--features=prod \
--target=x86_64-unknown-linux-musl \
--config build.rustc-wrapper="''" \
--config target.x86_64-unknown-linux-gnu.linker="'gcc'"
[private]
deploy ssh-path:
scp target/x86_64-unknown-linux-musl/release/app-pulse-bot '{{ssh-path}}'