Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
64 lines (51 loc) · 1.75 KB
/
Copy pathjustfile
File metadata and controls
64 lines (51 loc) · 1.75 KB
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
# https://github.com/snowfallorg/nix-software-center/blob/next/justfile
builddir := "builddir"
profile := "development"
bin := "xeonitte"
local := "~/.local"
meson_flags := "-Dprofile=" + profile + " -Dprefix=" + local
# Configure meson build directory
setup:
@if [ ! -f {{ builddir }}/build.ninja ]; then \
meson setup {{ builddir }} {{ meson_flags }}; \
elif ! meson configure {{ builddir }} | grep -q "profile.*{{ profile }}"; then \
meson setup {{ builddir }} --reconfigure {{ meson_flags }} + "--buildtype=debug"; \
fi
# Reconfigure existing build directory
reconfigure:
meson setup {{ builddir }} --reconfigure {{ meson_flags }} + "--buildtype=debug"
# Build the project
build: setup
meson compile -C {{ builddir }}
# Install to local prefix
install: build
meson install -C {{ builddir }}
# Build, install, and run the app
run: install
RUST_LOG={{ bin }}=DEBUG \
~/.local/bin/{{ bin }}
# Clean build directory
clean:
cargo clean
rm -rf {{ builddir }} \
~/.local/etc/xeonitte \
~/.local/bin/{{ bin }}
# Watch for changes and rebuild
watch:
bacon
# Run clippy lints
lint:
cargo clippy --manifest-path Cargo.toml
# Format code
fmt:
cargo fmt --manifest-path Cargo.toml
# Fix lints and format code
fix:
cargo clippy --manifest-path Cargo.toml --fix --allow-dirty --allow-staged
cargo fmt --manifest-path Cargo.toml
# Clean and reconfigure from scratch
rebuild: clean setup build
# generate new .pot file & update existing languages from LINGUAS
trans:
xgettext --directory=. --files-from=./po/POTFILES.in --from-code=UTF-8 -kgettext -o ./po/translations.pot --language=Rust
grep -v '^#' ./po/LINGUAS | xargs -I {} sh -c "msgmerge --update --previous ./po/{}.po ./po/translations.pot"