Skip to content

Commit

Permalink
meta: Remove --offline flag from CI cargo invocations.
Browse files Browse the repository at this point in the history
  • Loading branch information
luleyleo committed Sep 9, 2024
1 parent eb3e711 commit 444a1e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
3 changes: 1 addition & 2 deletions build-aux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
.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 --offline fetch --manifest-path Cargo.toml --verbose
cargo --offline build --package clapgrep-gnome --release
cargo 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
3 changes: 1 addition & 2 deletions build-aux/fun.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env sh

export CARGO_HOME=/run/build/clapgrep/cargo
flatpak-builder --run $(dirname $0)/../flatpak $(dirname $0)/de.leopoldluley.Clapgrep.json "$@"
flatpak-builder --run $(dirname $0)/../flatpak $(dirname $0)/de.leopoldluley.Clapgrep.json env CARGO_HOME=/run/build/clapgrep/cargo "$@"
12 changes: 4 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ 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}}

Expand All @@ -46,11 +42,11 @@ run *args: build-translations
ci: setup-flatpak-repos
flatpak-builder --keep-build-dirs --disable-updates --build-only --ccache --force-clean flatpak build-aux/{{appid}}.json
echo Check formatting:
./build-aux/fun.sh env CARGO_HOME=/run/build/clapgrep/cargo cargo --offline fmt --all -- --check --verbose
./build-aux/fun.sh cargo fmt --all -- --check --verbose
echo Check code:
./build-aux/fun.sh env CARGO_HOME=/run/build/clapgrep/cargo cargo --offline check
./build-aux/fun.sh cargo check
echo Check code with Clippy:
./build-aux/fun.sh env CARGO_HOME=/run/build/clapgrep/cargo cargo --offline clippy --workspace --all-targets --all-features -- -D warnings
./build-aux/fun.sh cargo clippy --workspace --all-targets --all-features -- -D warnings

install:
mkdir -p {{po-dst}}
Expand All @@ -64,7 +60,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-offline --release 2>&1 | sed 's/^/\t/' | sed 's/\$/$$/g' >> build-aux/Makefile
just -n build --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 444a1e7

Please sign in to comment.