index : gitrs
A lightweight web interface for browsing Git repositories, implemented in Rust
about summary refs log tree commit diff
gitrs / justfile
-rw-r--r-- blob f894d576457fd10a4061db38737be44dfb7c5b60 1067 bytes (plain)
1
arm_target := "aarch64-unknown-linux-gnu"
2
3
default:
4
    @just --list
5
6
# Build debug binary
7
build *args:
8
    cargo build {{args}}
9
10
# Build optimized release binary (x86_64)
11
build-release:
12
    cargo build --release
13
14
# Cross-compile static ARM64 binary for Orange Pi
15
build-arm:
16
    cargo build --release --target {{arm_target}}
17
18
# Build and deploy ARM64 binary + systemd service to Orange Pi
19
deploy host="pi": build-arm
20
    ssh {{host}} "systemctl stop gitrs || true"
21
    scp target/{{arm_target}}/release/gitrs {{host}}:/usr/bin/gitrs
22
    # scp gitrs.service {{host}}:/etc/systemd/system/gitrs.service
23
    ssh {{host}} "systemctl daemon-reload && systemctl start gitrs"
24
25
# Run locally (e.g. `just run -p 8080 -r ./repos`)
26
run *args:
27
    cargo run -- {{args}}
28
29
# Fast type and borrow check
30
check:
31
    cargo check --all-targets
32
33
# Format all Rust code
34
fmt:
35
    cargo fmt --all
36
37
# Run clippy with warnings denied
38
lint:
39
    cargo clippy --all-targets --all-features -- -D warnings
40
41
# Run format and lint checks
42
ci: fmt lint
43
44
# Remove build artifacts
45
clean:
46
    cargo clean