-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathjustfile
51 lines (39 loc) · 1.57 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
appid := 'de.leopoldluley.Clapgrep.Devel'
default:
just --list
clean:
cargo clean
rm -rf build
rm -rf flatpak
rm -rf flatpak-build
rm -rf .flatpak-builder
setup:
[ -d build ] || meson setup -Dprofile=development build
check: setup
meson compile -C build cargo-clippy
build: setup
meson compile -C build
run: setup
meson compile -C build && env RUST_BACKTRACE=full build/gnome/clapgrep
setup-flatpak-repos:
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
ci: setup-flatpak-repos
flatpak-builder --keep-build-dirs --install-deps-from=flathub --user --build-only --ccache --force-clean flatpak build-aux/{{appid}}.json
echo Check formatting:
./build-aux/fun.sh cargo fmt --all -- --check --verbose
echo Check code with Clippy:
./build-aux/fun.sh meson setup -Dprofile=development /run/build/clapgrep/build-ci
./build-aux/fun.sh meson compile -C /run/build/clapgrep/build-ci cargo-clippy
install-flatpak: setup-flatpak-repos
flatpak-builder flatpak-build build-aux/{{appid}}.json --force-clean --install --install-deps-from=flathub --user
update-potfiles:
rm -f po/POTFILES
echo assets/de.leopoldluley.Clapgrep.desktop.in.in >> po/POTFILES
echo assets/de.leopoldluley.Clapgrep.metainfo.xml.in.in >> po/POTFILES
fd .blp gnome/src/ui >> po/POTFILES
rg -l gettext gnome/src/ui >> po/POTFILES
update-translations: update-potfiles
meson compile -C build clapgrep-pot
meson compile -C build clapgrep-update-po
add-translation language:
msginit -l {{language}}.UTF8 -o po/{{language}}.po -i po/clapgrep.pot