Skip to content

Commit

Permalink
meta: Another attempt at fixing the CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
luleyleo committed Sep 9, 2024
1 parent be42d86 commit a31908e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion build-aux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
.PHONY: all
all:
cat po/LINGUAS | while read lang; do mkdir -p assets/locale/$$lang/LC_MESSAGES; msgfmt -o assets/locale/$$lang/LC_MESSAGES/de.leopoldluley.Clapgrep.mo po/$$lang.po; done
cargo build --package clapgrep-gnome --release
cargo --offline fetch --manifest-path Cargo.toml --verbose
cargo --offline build --package clapgrep-gnome --release
mkdir -p /app/share/locale
install -Dm0755 target/release/clapgrep-gnome /app/bin/clapgrep
install -Dm0755 assets/de.leopoldluley.Clapgrep.desktop /app/share/applications/de.leopoldluley.Clapgrep.desktop
Expand Down
1 change: 1 addition & 0 deletions build-aux/fun.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env sh

export CARGO_HOME=/run/build/clapgrep/cargo
flatpak-builder --run $(dirname $0)/../flatpak $(dirname $0)/de.leopoldluley.Clapgrep.json "$@"
14 changes: 9 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,24 @@ clean:
build *args: build-translations
cargo build --package {{frontend}} {{args}}

build-offline *args: build-translations
cargo --offline fetch --manifest-path Cargo.toml --verbose
cargo --offline build --package {{frontend}} {{args}}

check *args:
cargo clippy --all-features {{args}}

run *args: build-translations
env RUST_BACKTRACE=full cargo run --package {{frontend}} {{args}}

ci: setup-flatpak-repos
flatpak-builder --delete-build-dirs --disable-updates --build-only --ccache --force-clean flatpak build-aux/{{appid}}.json
flatpak-builder --keep-build-dirs --disable-updates --build-only --ccache --force-clean flatpak build-aux/{{appid}}.json
echo Check formatting:
./build-aux/fun.sh cargo fmt --all -- --check --verbose
./build-aux/fun.sh cargo --offline fmt --all -- --check --verbose
echo Check code:
./build-aux/fun.sh cargo check
./build-aux/fun.sh cargo --offline check
echo Check code with Clippy:
./build-aux/fun.sh cargo clippy --workspace --all-targets --all-features -- -D warnings
./build-aux/fun.sh cargo --offline clippy --workspace --all-targets --all-features -- -D warnings

install:
mkdir -p {{po-dst}}
Expand All @@ -60,7 +64,7 @@ make-makefile:
echo "# This file was generated by 'just make-makefile'" > build-aux/Makefile
echo ".PHONY: all" >> build-aux/Makefile
echo "all:" >> build-aux/Makefile
just -n build --release 2>&1 | sed 's/^/\t/' | sed 's/\$/$$/g' >> build-aux/Makefile
just -n build-offline --release 2>&1 | sed 's/^/\t/' | sed 's/\$/$$/g' >> build-aux/Makefile
just -n --set prefix /app install 2>&1 | sed 's/^/\t/' >> build-aux/Makefile

prepare-flatpak: make-makefile
Expand Down

0 comments on commit a31908e

Please sign in to comment.