From c92cfc644d0601fad89312b5b282c4e3ebbcc072 Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Mon, 27 Dec 2021 13:49:15 -0800 Subject: [PATCH] bug/ci: fix debian file generation breaking completions (#645) Fixes completion file generation being broken while the .deb file is made, due to using an incorrect path. --- .github/workflows/deployment.yml | 18 +++++++++++++++--- .github/workflows/nightly.yml | 16 ++++++++++++++-- Cargo.toml | 10 +++------- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 7676a8e4..6197d9c8 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -326,10 +326,22 @@ jobs: with: key: x86_64-unknown-linux-gnu-deb - - name: Build Debian release (Linux x86-64 GNU) + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --verbose --features "battery" + + - name: Move autocomplete to working directory + shell: bash run: | - cargo install cargo-deb --version 1.29.0 --locked - cargo deb + mkdir completion + cp -r ./target/release/build/bottom-*/out/. completion + + - name: Build Debian release + run: | + cargo install cargo-deb --version 1.34.0 --locked + cargo deb --no-build cp ./target/debian/bottom_*.deb ./bottom_${{ env.RELEASE_VERSION }}_amd64.deb - name: Create release directory for artifact, move file diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d1fbacfe..d0d6cae1 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -313,10 +313,22 @@ jobs: with: key: x86_64-unknown-linux-gnu-deb + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --verbose --features "battery" + + - name: Move autocomplete to working directory + shell: bash + run: | + mkdir completion + cp -r ./target/release/build/bottom-*/out/. completion + - name: Build Debian release run: | - cargo install cargo-deb --version 1.29.0 --locked - cargo deb + cargo install cargo-deb --version 1.34.0 --locked + cargo deb --no-build cp ./target/debian/bottom_*.deb ./bottom_${{ env.RELEASE_VERSION }}_amd64.deb - name: Create release directory for artifact, move file diff --git a/Cargo.toml b/Cargo.toml index effa6e39..ce0f843f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,20 +92,16 @@ assets = [ ["target/release/btm", "usr/bin/", "755"], ["LICENSE", "usr/share/doc/btm/", "644"], [ - "target/release/build/bottom-*/out/btm.bash", + "completion/btm.bash", "usr/share/bash-completion/completions/btm", "644", ], [ - "target/release/build/bottom-*/out/btm.fish", + "completion/btm.fish", "usr/share/fish/vendor_completions.d/btm.fish", "644", ], - [ - "target/release/build/bottom-*/out/_btm", - "usr/share/zsh/vendor-completions/", - "644", - ], + ["completion/_btm", "usr/share/zsh/vendor-completions/", "644"], ] extended-description = """\ A cross-platform graphical process/system monitor with a customizable interface and a multitude of