[arch-commits] Commit in mdbook/trunk (PKGBUILD)

Caleb Maclennan alerque at gemini.archlinux.org
Sat Aug 7 19:32:34 UTC 2021


    Date: Saturday, August 7, 2021 @ 19:32:34
  Author: alerque
Revision: 994699

Avoid double building entire app

Using `cargo run` was rebuilding the entire app using a different profile than
the `cargo build` that was just run. Generating completions like this is
causing two complete build cycles to run. Re-using the binary we already
generated cuts the build() phase almost half (just under since the debug build
is faster than the release optimized one).

Modified:
  mdbook/trunk/PKGBUILD

----------+
 PKGBUILD |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-08-07 19:16:39 UTC (rev 994698)
+++ PKGBUILD	2021-08-07 19:32:34 UTC (rev 994699)
@@ -6,7 +6,7 @@
 
 pkgname=mdbook
 pkgver=0.4.12
-pkgrel=2
+pkgrel=3
 pkgdesc="Create book from markdown files, like Gitbook but implemented in Rust"
 url="https://github.com/rust-lang/mdBook"
 arch=('x86_64')
@@ -26,9 +26,9 @@
 build() {
   cd "mdBook-${pkgver}"
   cargo build --frozen --release
-  cargo run -- completions bash > "completions/$pkgname.bash"
-  cargo run -- completions fish > "completions/$pkgname.fish"
-  cargo run -- completions zsh > "completions/_$pkgname"
+  "./target/release/$pkgname" completions bash > "completions/$pkgname.bash"
+  "./target/release/$pkgname" completions fish > "completions/$pkgname.fish"
+  "./target/release/$pkgname" completions zsh > "completions/_$pkgname"
 }
 
 check() {



More information about the arch-commits mailing list