From 444a1e75487b022f7b4c2d61232e2954550e33f1 Mon Sep 17 00:00:00 2001 From: Leopold Luley Date: Mon, 9 Sep 2024 23:23:22 +0200 Subject: [PATCH] meta: Remove --offline flag from CI cargo invocations. --- build-aux/Makefile | 3 +-- build-aux/fun.sh | 3 +-- justfile | 12 ++++-------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/build-aux/Makefile b/build-aux/Makefile index c07af24..c0a20a3 100644 --- a/build-aux/Makefile +++ b/build-aux/Makefile @@ -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 diff --git a/build-aux/fun.sh b/build-aux/fun.sh index b215a7b..9ef0118 100755 --- a/build-aux/fun.sh +++ b/build-aux/fun.sh @@ -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 "$@" diff --git a/justfile b/justfile index 5bb006f..439864d 100644 --- a/justfile +++ b/justfile @@ -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}} @@ -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}} @@ -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